diff options
author | Sam Hartman <hartmans@mit.edu> | 2011-09-19 00:59:20 +0000 |
---|---|---|
committer | Sam Hartman <hartmans@mit.edu> | 2011-09-19 00:59:20 +0000 |
commit | 849fdaed46bfcec4374809421f6bb606e0c8d95e (patch) | |
tree | e5c4cb7573763890144de706583569395e729db0 /src | |
parent | afcb63156a8d43aa6a0aefcb70e6a79ddb8f0c7f (diff) | |
download | krb5-849fdaed46bfcec4374809421f6bb606e0c8d95e.tar.gz krb5-849fdaed46bfcec4374809421f6bb606e0c8d95e.tar.xz krb5-849fdaed46bfcec4374809421f6bb606e0c8d95e.zip |
Fixed some warnings on Windows
Windows VC compiler complains about comparison between signed and unsigned
int types, unused variables
Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com>
Signed-off-by: Sam Hartman <hartmans@debian.org>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25205 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/appl/gss-sample/gss-client.c | 4 | ||||
-rw-r--r-- | src/windows/gss/gss-client.c | 4 | ||||
-rw-r--r-- | src/windows/gss/gss-misc.c | 4 | ||||
-rw-r--r-- | src/windows/gss/gss.c | 3 |
4 files changed, 7 insertions, 8 deletions
diff --git a/src/appl/gss-sample/gss-client.c b/src/appl/gss-sample/gss-client.c index d2eaab3fa..1cb797dac 100644 --- a/src/appl/gss-sample/gss-client.c +++ b/src/appl/gss-sample/gss-client.c @@ -395,7 +395,7 @@ read_file(file_name, in_buf) perror("read"); exit(1); } - if (count < in_buf->length) + if (count < (int)in_buf->length) fprintf(stderr, "Warning, only read in %d bytes, expected %d\n", count, (int) in_buf->length); } @@ -563,7 +563,7 @@ call_server(host, port, oid, service_name, gss_flags, auth_flag, in_buf.length = strlen((char *)in_buf.value); } - for (i = 0; i < mcount; i++) { + for (i = 0; i < (size_t)mcount; i++) { if (wrap_flag) { maj_stat = gss_wrap(&min_stat, context, encrypt_flag, GSS_C_QOP_DEFAULT, diff --git a/src/windows/gss/gss-client.c b/src/windows/gss/gss-client.c index 35156dec6..ae8868fd9 100644 --- a/src/windows/gss/gss-client.c +++ b/src/windows/gss/gss-client.c @@ -288,7 +288,7 @@ static void read_file(file_name, in_buf) perror("read"); exit(1); } - if (count < in_buf->length) + if (count < (int)in_buf->length) printf("Warning, only read in %d bytes, expected %d\r\n", count, (int) in_buf->length); } @@ -454,7 +454,7 @@ int call_server(char *host, u_short port, gss_OID oid, char *service_name, in_buf.length = strlen(msg); } - for (i = 0; i < mcount; i++) { + for (i = 0; i < (size_t)mcount; i++) { if (wrap_flag) { maj_stat = gss_wrap(&min_stat, context, encrypt_flag, GSS_C_QOP_DEFAULT, &in_buf, &state, &out_buf); diff --git a/src/windows/gss/gss-misc.c b/src/windows/gss/gss-misc.c index 74f005ea8..bf25eaafb 100644 --- a/src/windows/gss/gss-misc.c +++ b/src/windows/gss/gss-misc.c @@ -129,7 +129,7 @@ static int read_all(int s, char *buf, unsigned int nbyte) */ int send_token(int s, int flags, gss_buffer_t tok) { - int len, ret; + int ret; unsigned char char_flags = (unsigned char) flags; unsigned char lenbuf[4]; @@ -365,7 +365,7 @@ void display_ctx_flags(flags) void print_token(tok) gss_buffer_t tok; { - int i; + size_t i; unsigned char *p = tok->value; if (!verbose) diff --git a/src/windows/gss/gss.c b/src/windows/gss/gss.c index fea0253fc..68d266f3f 100644 --- a/src/windows/gss/gss.c +++ b/src/windows/gss/gss.c @@ -709,8 +709,7 @@ fill_combo (HWND hDlg) { int gss_printf (const char *format, ...) { static char myprtfstr[4096]; - int i, len, rc=0; - char *cp; + int rc=0; va_list ap; va_start(ap, format); |