Sfoglia il codice sorgente

ERR: Remove warnings

Andy Cedilnik 23 anni fa
parent
commit
93f7601d0f

+ 6 - 2
Source/CTest/Curl/getdate.c

@@ -691,6 +691,9 @@ yyparse(YYPARSE_PARAM_ARG)
     fprintf(stderr, "Starting parse\n");
 #endif
 
+  yylval.Number = 0;
+  yyval.Number = 0;
+   
   yystate = 0;
   yyerrstatus = 0;
   yynerrs = 0;
@@ -712,7 +715,7 @@ yyparse(YYPARSE_PARAM_ARG)
    have just been pushed. so pushing a state here evens the stacks.  */
 yynewstate:
 
-  *++yyssp = yystate;
+  *++yyssp = (short)yystate;
 
   if (yyssp >= yyss + yystacksize - 1)
     {
@@ -1729,6 +1732,7 @@ static int
 yyerror (s)
      char *s ATTRIBUTE_UNUSED;
 {
+  (void)s;
   return 0;
 }
 
@@ -1792,7 +1796,7 @@ LookupWord (yylval, buff)
   /* Make it lowercase. */
   for (p = buff; *p; p++)
     if (ISUPPER ((unsigned char) *p))
-      *p = tolower (*p);
+      *p = (char)tolower (*p);
 
   if (strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0)
     {

+ 4 - 4
Source/CTest/Curl/mprintf.c

@@ -659,7 +659,7 @@ static int dprintf_formatf(
     else
       prec = -1;
 
-    alt = p->flags & FLAGS_ALT;
+    alt = (char)(p->flags & FLAGS_ALT);
     
     switch (p->type) {
     case FORMAT_INT:
@@ -707,7 +707,7 @@ static int dprintf_formatf(
       {
         signed_num = (long) num;
       
-        is_neg = signed_num < 0;
+        is_neg = (char)(signed_num < 0);
         num = is_neg ? (- signed_num) : signed_num;
       }
       goto number;
@@ -937,7 +937,7 @@ static int dprintf_formatf(
       else if (!(p->flags & FLAGS_SHORT))
         *(int *) p->data.ptr = done;
       else
-        *(short int *) p->data.ptr = done;
+        *(short int *) p->data.ptr = (short int)done;
       break;
 
     default:
@@ -1023,7 +1023,7 @@ static int alloc_addbyter(int output, FILE *data)
     infop->alloc *= 2;
   }
 
-  infop->buffer[ infop->len ] = output;
+  infop->buffer[ infop->len ] = (char)output;
 
   infop->len++;
 

+ 2 - 0
Source/CTest/Curl/timeval.c

@@ -21,6 +21,7 @@
  * $Id$
  ***************************************************************************/
 
+#include "setup.h"
 #ifdef WIN32
 #include <windows.h>
 #endif
@@ -65,6 +66,7 @@ gettimeofday (struct timeval *tp, void *nothing)
   tp->tv_sec = Sec;
   tp->tv_usec = Usec;
 #endif
+  (void)nothing;
   return 1;
 }
 #define HAVE_GETTIMEOFDAY