From c6ed62c366ec519981c02d1c1b410bcb44e97e06 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 20 Feb 2010 16:02:30 +0100 Subject: [PATCH] Tweak eliminate compiler wornings --- bacula/src/dird/ua_run.c | 2 +- bacula/src/dird/ua_update.c | 17 +++++++++-------- bacula/src/stored/askdir.c | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/bacula/src/dird/ua_run.c b/bacula/src/dird/ua_run.c index 5a25811eb4..0a8e12468d 100644 --- a/bacula/src/dird/ua_run.c +++ b/bacula/src/dird/ua_run.c @@ -939,7 +939,7 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char break; case JT_COPY: case JT_MIGRATE: - char *prt_type; + const char *prt_type; if (jcr->getJobType() == JT_COPY) { prt_type = _("Run Copy job\n"); } else { diff --git a/bacula/src/dird/ua_update.c b/bacula/src/dird/ua_update.c index d430fda8cf..4a27e78a07 100644 --- a/bacula/src/dird/ua_update.c +++ b/bacula/src/dird/ua_update.c @@ -346,7 +346,8 @@ void update_vol_recyclepool(UAContext *ua, char *val, MEDIA_DBR *mr) { POOL_DBR pr; POOL_MEM query(PM_MESSAGE); - char ed1[50], ed2[50], *poolname; + char ed1[50], ed2[50]; + const char *poolname; if(val && *val) { /* update volume recyclepool="Scratch" */ /* If a pool name is given, look up the PoolId */ @@ -587,9 +588,9 @@ static int update_volume(UAContext *ua) case 13: update_vol_recyclepool(ua, ua->argv[j], &mr); break; - case 14: - update_vol_actiononpurge(ua, ua->argv[j], &mr); - break; + case 14: + update_vol_actiononpurge(ua, ua->argv[j], &mr); + break; } done = true; } @@ -818,14 +819,14 @@ static int update_volume(UAContext *ua) case 16: pm_strcpy(ret, ""); - ua->info_msg(_("Current ActionOnPurge is: %s\n"), + ua->info_msg(_("Current ActionOnPurge is: %s\n"), aop_to_str(mr.ActionOnPurge, ret)); - if (!get_cmd(ua, _("Enter new ActionOnPurge (one of: Truncate, None): "))) { + if (!get_cmd(ua, _("Enter new ActionOnPurge (one of: Truncate, None): "))) { return 0; - } + } update_vol_actiononpurge(ua, ua->cmd, &mr); - break; + break; default: /* Done or error */ ua->info_msg(_("Selection terminated.\n")); diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index 38605b0a20..448f279560 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.c @@ -608,7 +608,7 @@ bool dir_ask_sysop_to_mount_volume(DCR *dcr, int mode) * Otherwise skip it. */ if (!dev->poll && (stat == W_TIMEOUT || stat == W_MOUNT)) { - char *msg; + const char *msg; if (mode == ST_APPEND) { msg = _("Please mount Volume \"%s\" or label a new one for:\n" " Job: %s\n" -- 2.39.5