From 67a6b3256a9d713595f4040d0554fb424ff6dd84 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 19 Jun 2008 17:01:12 +0000 Subject: [PATCH] Fix a couple of pedantic compiler warnings. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7179 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/cats/cats.h | 2 +- bacula/src/cats/postgresql.c | 6 +++--- bacula/src/console/console.c | 2 +- bacula/technotes-2.3 | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bacula/src/cats/cats.h b/bacula/src/cats/cats.h index e399624307..20e0c2c07c 100644 --- a/bacula/src/cats/cats.h +++ b/bacula/src/cats/cats.h @@ -476,7 +476,7 @@ void my_postgresql_free_result(B_DB *mdb); POSTGRESQL_ROW my_postgresql_fetch_row (B_DB *mdb); int my_postgresql_query (B_DB *mdb, const char *query); void my_postgresql_data_seek (B_DB *mdb, int row); -int my_postgresql_currval (B_DB *mdb, char *table_name); +int my_postgresql_currval (B_DB *mdb, const char *table_name); void my_postgresql_field_seek (B_DB *mdb, int row); POSTGRESQL_FIELD * my_postgresql_fetch_field(B_DB *mdb); diff --git a/bacula/src/cats/postgresql.c b/bacula/src/cats/postgresql.c index 6c6c38f76b..82259ff867 100644 --- a/bacula/src/cats/postgresql.c +++ b/bacula/src/cats/postgresql.c @@ -546,7 +546,7 @@ void my_postgresql_free_result(B_DB *mdb) db_unlock(mdb); } -int my_postgresql_currval(B_DB *mdb, char *table_name) +int my_postgresql_currval(B_DB *mdb, const char *table_name) { // Obtain the current value of the sequence that // provides the serial value for primary key of the table. @@ -615,7 +615,7 @@ bail_out: int my_postgresql_batch_start(JCR *jcr, B_DB *mdb) { - char *query = "COPY batch FROM STDIN"; + const char *query = "COPY batch FROM STDIN"; Dmsg0(500, "my_postgresql_batch_start started\n"); @@ -709,7 +709,7 @@ int my_postgresql_batch_insert(JCR *jcr, B_DB *mdb, ATTR_DBR *ar) int res; int count=30; size_t len; - char *digest; + const char *digest; char ed1[50]; mdb->esc_name = check_pool_memory_size(mdb->esc_name, mdb->fnl*2+1); diff --git a/bacula/src/console/console.c b/bacula/src/console/console.c index c691c2316f..55b3ea700b 100644 --- a/bacula/src/console/console.c +++ b/bacula/src/console/console.c @@ -732,7 +732,7 @@ get_cmd(FILE *input, const char *prompt, BSOCK *sock, int sec) #else /* no readline, do it ourselves */ -#if !defined(HAVE_WIN32) +#ifdef HAVE_CONIO static bool bisatty(int fd) { if (no_conio) { diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index 98e3667437..9dbc06f02d 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -2,6 +2,7 @@ General: 19Jun08 +kes Fix a couple of pedantic compiler warnings. ebl Fix bug when starting a restore on a storage that doesn't have the requested MediaType. 18Jun08 -- 2.39.5