Skip to content

Commit

Permalink
Fix compiler warnings when not using dynamic backend loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Jul 24, 2014
1 parent 77617a8 commit 14dea19
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/dird/dbcheck.c
Expand Up @@ -61,7 +61,9 @@ static NAME_LIST name_list;
static char buf[20000];
static bool quit = false;
static const char *idx_tmp_name;
#if defined(HAVE_DYNAMIC_CATS_BACKENDS)
static const char *backend_directory = _PATH_BAREOS_BACKENDDIR;
#endif

DIRRES *me = NULL; /* Our Global resource */
CONFIG *my_config = NULL; /* Our Global config */
Expand Down Expand Up @@ -126,7 +128,9 @@ int main (int argc, char *argv[])
char *configfile = NULL;
char *catalogname = NULL;
char *endptr;
alist* backend_directories = NULL;
#if defined(HAVE_DYNAMIC_CATS_BACKENDS)
alist *backend_directories = NULL;
#endif

setlocale(LC_ALL, "");
bindtextdomain("bareos", LOCALEDIR);
Expand Down
6 changes: 4 additions & 2 deletions src/stored/bscan.c
Expand Up @@ -141,7 +141,9 @@ int main (int argc, char *argv[])
char *VolumeName = NULL;
char *DirectorName = NULL;
DIRRES *director = NULL;
alist* backend_directories = NULL;
#if defined(HAVE_DYNAMIC_CATS_BACKENDS)
alist *backend_directories = NULL;
#endif

setlocale(LC_ALL, "");
bindtextdomain("bareos", LOCALEDIR);
Expand Down Expand Up @@ -321,7 +323,7 @@ int main (int argc, char *argv[])
backend_directories = New(alist(10, owned_by_alist));
backend_directories->append((char *)backend_directory);

db_set_backend_dirs( backend_directories );
db_set_backend_dirs(backend_directories);
#endif

if ((db = db_init_database(NULL, db_driver, db_name, db_user, db_password, db_host, db_port, NULL)) == NULL) {
Expand Down
4 changes: 3 additions & 1 deletion src/tests/bbatch.c
Expand Up @@ -104,7 +104,9 @@ static int list_handler(void *ctx, int num_fields, char **row)
int main (int argc, char *argv[])
{
int ch;
alist* backend_directories = NULL;
#if defined(HAVE_DYNAMIC_CATS_BACKENDS)
alist *backend_directories = NULL;
#endif
bool disable_batch = false;
char *restore_list=NULL;
setlocale(LC_ALL, "");
Expand Down
4 changes: 3 additions & 1 deletion src/tests/bvfs_test.c
Expand Up @@ -108,7 +108,9 @@ static int result_handler(void *ctx, int fields, char **row)
int main (int argc, char *argv[])
{
int ch;
alist* backend_directories = NULL;
#if defined(HAVE_DYNAMIC_CATS_BACKENDS)
alist *backend_directories = NULL;
#endif
char *jobids = (char *)"1";
char *path=NULL, *client=NULL;
uint64_t limit=0;
Expand Down

0 comments on commit 14dea19

Please sign in to comment.