From: Jan Dittberner Date: Sun, 15 Nov 2009 14:10:20 +0000 (+0000) Subject: fix several CC warnings (taken from Debian) X-Git-Tag: cracklib-2-8-14@142~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d1bcd2fc1e165e7bdce54bc69248735b260f081c;p=cracklib fix several CC warnings (taken from Debian) git-svn-id: file:///tmp/cracklib-svn/trunk/cracklib@133 4175fe1e-86d5-4fdc-8e6a-506fab9d8533 --- diff --git a/NEWS b/NEWS index f766124..a358ee9 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ v2.8.14 Added russian translation (Anton Dobkin) Added Telugu translation (Krishna Babu) Updated polish translation (Piotr Drąg) optimize order of commands in util/cracklib-format (Jan Dittberner, Debian) + fix several CC warnings (Jan Dittberner, Debian) v2.8.13 Compressed dictionary support and better python module v2.8.11 Better create-cracklib-dict helper script (Mike Frysinger) v2.8.10 Patch for better hanlding of cracklist dictionary paths in python binding. (Nalin Dahyabhai) diff --git a/lib/packlib.c b/lib/packlib.c index 29d7b14..73f53ea 100644 --- a/lib/packlib.c +++ b/lib/packlib.c @@ -15,7 +15,7 @@ #endif #include "packer.h" -static char vers_id[] = "packlib.c : v2.3p2 Alec Muffett 18 May 1993"; +static const char vers_id[] = "packlib.c : v2.3p2 Alec Muffett 18 May 1993"; #define DEBUG 0 diff --git a/lib/rules.c b/lib/rules.c index 6b55380..7091464 100644 --- a/lib/rules.c +++ b/lib/rules.c @@ -4,7 +4,7 @@ * or its effect upon hardware or computer systems. */ -static char vers_id[] = "rules.c : v5.0p3 Alec Muffett 20 May 1993"; +static const char vers_id[] = "rules.c : v5.0p3 Alec Muffett 20 May 1993"; #include "config.h" #include @@ -24,7 +24,7 @@ Debug(val, a, b, c, d, e, f, g) int val; char *a, *b, *c, *d, *e, *f, *g; { - fprintf(stderr, a, b, c, d, e, f); + fprintf(stderr, a, b, c, d, e, f, g); } #else static void @@ -480,7 +480,7 @@ Mangle(input, control) /* returns a pointer to a controlled Mangle */ Debug(1, "Mangle: '>' weird argument in '%s'\n", control); return ((char *) 0); } - if (strlen(area) <= limit) + if ( (int) strlen(area) <= limit) { return ((char *) 0); } @@ -499,7 +499,7 @@ Mangle(input, control) /* returns a pointer to a controlled Mangle */ Debug(1, "Mangle: '<' weird argument in '%s'\n", control); return ((char *) 0); } - if (strlen(area) >= limit) + if ( (int) strlen(area) >= limit) { return ((char *) 0); } diff --git a/lib/stringlib.c b/lib/stringlib.c index 2be02b9..0fc497b 100644 --- a/lib/stringlib.c +++ b/lib/stringlib.c @@ -11,7 +11,7 @@ #endif #include "packer.h" -static char vers_id[] = "stringlib.c : v2.3p2 Alec Muffett 18 May 1993"; +static const char vers_id[] = "stringlib.c : v2.3p2 Alec Muffett 18 May 1993"; char Chop(string) diff --git a/util/packer.c b/util/packer.c index 2e75f5c..688b247 100644 --- a/util/packer.c +++ b/util/packer.c @@ -17,8 +17,8 @@ main(argc, argv) int argc; char *argv[]; { - uint32_t readed; - uint32_t wrote; + unsigned long readed; + unsigned long wrote; PWDICT *pwp; char buffer[STRINGSIZE]; char *file;