warnings--
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 19 Sep 2010 03:00:12 +0000 (03:00 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 19 Sep 2010 03:00:12 +0000 (03:00 +0000)
warnings = 0

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/embryo@52451 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/embryo_cc_sc2.c
src/bin/embryo_cc_sc3.c
src/bin/embryo_cc_sc4.c
src/bin/embryo_cc_sc6.c
src/bin/embryo_cc_sc7.c
src/bin/embryo_cc_sclist.c

index 67845f8..e9b6166 100644 (file)
@@ -101,7 +101,8 @@ plungequalifiedfile(char *name)
          }                     /* if */
        ext_idx++;
      }
-   while (!fp && ext_idx < (sizeof extensions / sizeof extensions[0]));
+   while ((!fp) && 
+          (ext_idx < (int)(sizeof extensions / sizeof extensions[0])));
    if (!fp)
      {
        *ext = '\0';            /* restore filename */
@@ -197,11 +198,11 @@ doinclude(void)
      }                         /* if */
 
    i = 0;
-   while (*lptr != c && *lptr != '\0' && i < sizeof name - 1)  /* find the end of the string */
+   while ((*lptr != c) && (*lptr != '\0') && (i < (int)(sizeof(name) - 1))) /* find the end of the string */
       name[i++] = *lptr++;
    while (i > 0 && name[i - 1] <= ' ')
       i--;                     /* strip trailing whitespace */
-   assert(i >= 0 && i < sizeof name);
+   assert((i >= 0) && (i < (int)(sizeof(name))));
    name[i] = '\0';             /* zero-terminate the string */
 
    if (*lptr != c)
@@ -989,7 +990,9 @@ command(void)
                         {
                            int                 i;
 
-                           for (i = 0; i < sizeof name && alphanum(*lptr);
+                           for (i = 0; 
+                                 (i < (int)(sizeof(name))) && 
+                                 (alphanum(*lptr));
                                 i++, lptr++)
                               name[i] = *lptr;
                            name[i] = '\0';
@@ -1022,9 +1025,11 @@ command(void)
                       int                 i;
 
                       /* first gather all information, start with the tag name */
-                      while (*lptr <= ' ' && *lptr != '\0')
+                      while ((*lptr <= ' ') && (*lptr != '\0'))
                          lptr++;
-                      for (i = 0; i < sizeof name && alphanum(*lptr);
+                      for (i = 0; 
+                            (i < (int)(sizeof(name))) && 
+                            (alphanum(*lptr));
                            i++, lptr++)
                          name[i] = *lptr;
                       name[i] = '\0';
@@ -1084,9 +1089,11 @@ command(void)
                       do
                         {
                            /* get the name */
-                           while (*lptr <= ' ' && *lptr != '\0')
+                           while ((*lptr <= ' ') && (*lptr != '\0'))
                               lptr++;
-                           for (i = 0; i < sizeof name && isalpha(*lptr);
+                           for (i = 0; 
+                                 (i < (int)(sizeof(name))) && 
+                                 (isalpha(*lptr));
                                 i++, lptr++)
                               name[i] = *lptr;
                            name[i] = '\0';
index 4f948c5..1206857 100644 (file)
@@ -166,7 +166,7 @@ check_userop(void   (*oper) (void), int tag1, int tag2, int numparam,
          {
             assert((sizeof binoperstr / sizeof binoperstr[0]) ==
                    (sizeof op1 / sizeof op1[0]));
-            for (i = 0; i < sizeof op1 / sizeof op1[0]; i++)
+            for (i = 0; i < (int)(sizeof op1 / sizeof op1[0]); i++)
               {
                  if (oper == op1[i])
                    {
@@ -186,7 +186,7 @@ check_userop(void   (*oper) (void), int tag1, int tag2, int numparam,
               (sizeof unopers / sizeof unopers[0]));
        if (opername[0] == '\0')
          {
-            for (i = 0; i < sizeof unopers / sizeof unopers[0]; i++)
+            for (i = 0; i < (int)(sizeof unopers / sizeof unopers[0]); i++)
               {
                  if (oper == unopers[i])
                    {
index 57cbca1..258d714 100644 (file)
@@ -247,7 +247,7 @@ alignframe(int numbytes)
    /* "numbytes" should be a power of 2 for this code to work */
    int                 i, count = 0;
 
-   for (i = 0; i < sizeof numbytes * 8; i++)
+   for (i = 0; i < (int)(sizeof(numbytes) * 8); i++)
       if (numbytes & (1 << i))
         count++;
    assert(count == 1);
index 6fa53df..417a8a1 100644 (file)
@@ -665,7 +665,7 @@ assemble(FILE * fout, FILE * fin)
     * for a non-existent opcode)
     */
    assert(opcodelist[1].name != NULL);
-   for (i = 2; i < (sizeof opcodelist / sizeof opcodelist[0]); i++)
+   for (i = 2; i < (int)(sizeof(opcodelist) / sizeof(opcodelist[0])); i++)
      {
        assert(opcodelist[i].name != NULL);
        assert(strcasecmp(opcodelist[i].name, opcodelist[i - 1].name) > 0);
index 3cab5c0..910c522 100644 (file)
@@ -402,16 +402,16 @@ phopt_init(void)
        len =
           strexpand(str, (unsigned char *)sequences_cmp[i].find, sizeof str,
                     SCPACK_TABLE);
-       assert(len <= sizeof str);
-       assert(len == (int)strlen(str) + 1);
+       assert(len <= (int)(sizeof(str)));
+       assert(len == (int)(strlen(str) + 1));
        sequences[i].find = (char *)malloc(len);
        if (sequences[i].find)
           strcpy(sequences[i].find, str);
        len =
           strexpand(str, (unsigned char *)sequences_cmp[i].replace, sizeof str,
                     SCPACK_TABLE);
-       assert(len <= sizeof str);
-       assert(len == (int)strlen(str) + 1);
+       assert(len <= (int)(sizeof(str)));
+       assert(len == (int)(strlen(str) + 1));
        sequences[i].replace = (char *)malloc(len);
        if (sequences[i].replace)
           strcpy(sequences[i].replace, str);
index aaf5a12..e908248 100644 (file)
@@ -288,6 +288,6 @@ delete_substtable(void)
    int                 i;
 
    delete_stringpairtable(&substpair);
-   for (i = 0; i < sizeof substindex / sizeof substindex[0]; i++)
+   for (i = 0; i < (int)(sizeof(substindex) / sizeof(substindex[0])); i++)
       substindex[i] = NULL;
 }