svn rev #25205: trunk/src/ appl/gss-sample/ windows/gss/

hartmans@MIT.EDU hartmans at MIT.EDU
Sun Sep 18 20:59:20 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=25205
Commit By: hartmans
Log Message:
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 at gmail.com>
Signed-off-by: Sam Hartman <hartmans at debian.org>


Changed Files:
U   trunk/src/appl/gss-sample/gss-client.c
U   trunk/src/windows/gss/gss-client.c
U   trunk/src/windows/gss/gss-misc.c
U   trunk/src/windows/gss/gss.c
Modified: trunk/src/appl/gss-sample/gss-client.c
===================================================================
--- trunk/src/appl/gss-sample/gss-client.c	2011-09-19 00:59:14 UTC (rev 25204)
+++ trunk/src/appl/gss-sample/gss-client.c	2011-09-19 00:59:20 UTC (rev 25205)
@@ -395,7 +395,7 @@
         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 @@
         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,

Modified: trunk/src/windows/gss/gss-client.c
===================================================================
--- trunk/src/windows/gss/gss-client.c	2011-09-19 00:59:14 UTC (rev 25204)
+++ trunk/src/windows/gss/gss-client.c	2011-09-19 00:59:20 UTC (rev 25205)
@@ -288,7 +288,7 @@
 	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 @@
 	 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);

Modified: trunk/src/windows/gss/gss-misc.c
===================================================================
--- trunk/src/windows/gss/gss-misc.c	2011-09-19 00:59:14 UTC (rev 25204)
+++ trunk/src/windows/gss/gss-misc.c	2011-09-19 00:59:20 UTC (rev 25205)
@@ -129,7 +129,7 @@
  */
 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 print_token(tok)
      gss_buffer_t tok;
 {
-    int i;
+    size_t i;
     unsigned char *p = tok->value;
 
     if (!verbose)

Modified: trunk/src/windows/gss/gss.c
===================================================================
--- trunk/src/windows/gss/gss.c	2011-09-19 00:59:14 UTC (rev 25204)
+++ trunk/src/windows/gss/gss.c	2011-09-19 00:59:20 UTC (rev 25205)
@@ -709,8 +709,7 @@
 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);




More information about the cvs-krb5 mailing list