summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-09-19 03:00:12 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-09-19 03:00:12 +0000
commiteaa190ad0ed72f424f10a9709964a7ba7b04183e (patch)
tree38cc04a6a59e493b75e8580443897847f1aa9d42 /legacy
parent77e3899ad6b767d29135ab98ed56a4d16ccbd290 (diff)
warnings--
warnings = 0 SVN revision: 52451
Diffstat (limited to 'legacy')
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc2.c23
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc3.c4
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc4.c2
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc6.c2
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc7.c8
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sclist.c2
6 files changed, 24 insertions, 17 deletions
diff --git a/legacy/embryo/src/bin/embryo_cc_sc2.c b/legacy/embryo/src/bin/embryo_cc_sc2.c
index 67845f8e94..e9b6166f66 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc2.c
+++ b/legacy/embryo/src/bin/embryo_cc_sc2.c
@@ -101,7 +101,8 @@ plungequalifiedfile(char *name)
101 } /* if */ 101 } /* if */
102 ext_idx++; 102 ext_idx++;
103 } 103 }
104 while (!fp && ext_idx < (sizeof extensions / sizeof extensions[0])); 104 while ((!fp) &&
105 (ext_idx < (int)(sizeof extensions / sizeof extensions[0])));
105 if (!fp) 106 if (!fp)
106 { 107 {
107 *ext = '\0'; /* restore filename */ 108 *ext = '\0'; /* restore filename */
@@ -197,11 +198,11 @@ doinclude(void)
197 } /* if */ 198 } /* if */
198 199
199 i = 0; 200 i = 0;
200 while (*lptr != c && *lptr != '\0' && i < sizeof name - 1) /* find the end of the string */ 201 while ((*lptr != c) && (*lptr != '\0') && (i < (int)(sizeof(name) - 1))) /* find the end of the string */
201 name[i++] = *lptr++; 202 name[i++] = *lptr++;
202 while (i > 0 && name[i - 1] <= ' ') 203 while (i > 0 && name[i - 1] <= ' ')
203 i--; /* strip trailing whitespace */ 204 i--; /* strip trailing whitespace */
204 assert(i >= 0 && i < sizeof name); 205 assert((i >= 0) && (i < (int)(sizeof(name))));
205 name[i] = '\0'; /* zero-terminate the string */ 206 name[i] = '\0'; /* zero-terminate the string */
206 207
207 if (*lptr != c) 208 if (*lptr != c)
@@ -989,7 +990,9 @@ command(void)
989 { 990 {
990 int i; 991 int i;
991 992
992 for (i = 0; i < sizeof name && alphanum(*lptr); 993 for (i = 0;
994 (i < (int)(sizeof(name))) &&
995 (alphanum(*lptr));
993 i++, lptr++) 996 i++, lptr++)
994 name[i] = *lptr; 997 name[i] = *lptr;
995 name[i] = '\0'; 998 name[i] = '\0';
@@ -1022,9 +1025,11 @@ command(void)
1022 int i; 1025 int i;
1023 1026
1024 /* first gather all information, start with the tag name */ 1027 /* first gather all information, start with the tag name */
1025 while (*lptr <= ' ' && *lptr != '\0') 1028 while ((*lptr <= ' ') && (*lptr != '\0'))
1026 lptr++; 1029 lptr++;
1027 for (i = 0; i < sizeof name && alphanum(*lptr); 1030 for (i = 0;
1031 (i < (int)(sizeof(name))) &&
1032 (alphanum(*lptr));
1028 i++, lptr++) 1033 i++, lptr++)
1029 name[i] = *lptr; 1034 name[i] = *lptr;
1030 name[i] = '\0'; 1035 name[i] = '\0';
@@ -1084,9 +1089,11 @@ command(void)
1084 do 1089 do
1085 { 1090 {
1086 /* get the name */ 1091 /* get the name */
1087 while (*lptr <= ' ' && *lptr != '\0') 1092 while ((*lptr <= ' ') && (*lptr != '\0'))
1088 lptr++; 1093 lptr++;
1089 for (i = 0; i < sizeof name && isalpha(*lptr); 1094 for (i = 0;
1095 (i < (int)(sizeof(name))) &&
1096 (isalpha(*lptr));
1090 i++, lptr++) 1097 i++, lptr++)
1091 name[i] = *lptr; 1098 name[i] = *lptr;
1092 name[i] = '\0'; 1099 name[i] = '\0';
diff --git a/legacy/embryo/src/bin/embryo_cc_sc3.c b/legacy/embryo/src/bin/embryo_cc_sc3.c
index 4f948c54f1..1206857730 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc3.c
+++ b/legacy/embryo/src/bin/embryo_cc_sc3.c
@@ -166,7 +166,7 @@ check_userop(void (*oper) (void), int tag1, int tag2, int numparam,
166 { 166 {
167 assert((sizeof binoperstr / sizeof binoperstr[0]) == 167 assert((sizeof binoperstr / sizeof binoperstr[0]) ==
168 (sizeof op1 / sizeof op1[0])); 168 (sizeof op1 / sizeof op1[0]));
169 for (i = 0; i < sizeof op1 / sizeof op1[0]; i++) 169 for (i = 0; i < (int)(sizeof op1 / sizeof op1[0]); i++)
170 { 170 {
171 if (oper == op1[i]) 171 if (oper == op1[i])
172 { 172 {
@@ -186,7 +186,7 @@ check_userop(void (*oper) (void), int tag1, int tag2, int numparam,
186 (sizeof unopers / sizeof unopers[0])); 186 (sizeof unopers / sizeof unopers[0]));
187 if (opername[0] == '\0') 187 if (opername[0] == '\0')
188 { 188 {
189 for (i = 0; i < sizeof unopers / sizeof unopers[0]; i++) 189 for (i = 0; i < (int)(sizeof unopers / sizeof unopers[0]); i++)
190 { 190 {
191 if (oper == unopers[i]) 191 if (oper == unopers[i])
192 { 192 {
diff --git a/legacy/embryo/src/bin/embryo_cc_sc4.c b/legacy/embryo/src/bin/embryo_cc_sc4.c
index 57cbca1fe2..258d714228 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc4.c
+++ b/legacy/embryo/src/bin/embryo_cc_sc4.c
@@ -247,7 +247,7 @@ alignframe(int numbytes)
247 /* "numbytes" should be a power of 2 for this code to work */ 247 /* "numbytes" should be a power of 2 for this code to work */
248 int i, count = 0; 248 int i, count = 0;
249 249
250 for (i = 0; i < sizeof numbytes * 8; i++) 250 for (i = 0; i < (int)(sizeof(numbytes) * 8); i++)
251 if (numbytes & (1 << i)) 251 if (numbytes & (1 << i))
252 count++; 252 count++;
253 assert(count == 1); 253 assert(count == 1);
diff --git a/legacy/embryo/src/bin/embryo_cc_sc6.c b/legacy/embryo/src/bin/embryo_cc_sc6.c
index 6fa53df1ea..417a8a1193 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc6.c
+++ b/legacy/embryo/src/bin/embryo_cc_sc6.c
@@ -665,7 +665,7 @@ assemble(FILE * fout, FILE * fin)
665 * for a non-existent opcode) 665 * for a non-existent opcode)
666 */ 666 */
667 assert(opcodelist[1].name != NULL); 667 assert(opcodelist[1].name != NULL);
668 for (i = 2; i < (sizeof opcodelist / sizeof opcodelist[0]); i++) 668 for (i = 2; i < (int)(sizeof(opcodelist) / sizeof(opcodelist[0])); i++)
669 { 669 {
670 assert(opcodelist[i].name != NULL); 670 assert(opcodelist[i].name != NULL);
671 assert(strcasecmp(opcodelist[i].name, opcodelist[i - 1].name) > 0); 671 assert(strcasecmp(opcodelist[i].name, opcodelist[i - 1].name) > 0);
diff --git a/legacy/embryo/src/bin/embryo_cc_sc7.c b/legacy/embryo/src/bin/embryo_cc_sc7.c
index 3cab5c0aef..910c522585 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc7.c
+++ b/legacy/embryo/src/bin/embryo_cc_sc7.c
@@ -402,16 +402,16 @@ phopt_init(void)
402 len = 402 len =
403 strexpand(str, (unsigned char *)sequences_cmp[i].find, sizeof str, 403 strexpand(str, (unsigned char *)sequences_cmp[i].find, sizeof str,
404 SCPACK_TABLE); 404 SCPACK_TABLE);
405 assert(len <= sizeof str); 405 assert(len <= (int)(sizeof(str)));
406 assert(len == (int)strlen(str) + 1); 406 assert(len == (int)(strlen(str) + 1));
407 sequences[i].find = (char *)malloc(len); 407 sequences[i].find = (char *)malloc(len);
408 if (sequences[i].find) 408 if (sequences[i].find)
409 strcpy(sequences[i].find, str); 409 strcpy(sequences[i].find, str);
410 len = 410 len =
411 strexpand(str, (unsigned char *)sequences_cmp[i].replace, sizeof str, 411 strexpand(str, (unsigned char *)sequences_cmp[i].replace, sizeof str,
412 SCPACK_TABLE); 412 SCPACK_TABLE);
413 assert(len <= sizeof str); 413 assert(len <= (int)(sizeof(str)));
414 assert(len == (int)strlen(str) + 1); 414 assert(len == (int)(strlen(str) + 1));
415 sequences[i].replace = (char *)malloc(len); 415 sequences[i].replace = (char *)malloc(len);
416 if (sequences[i].replace) 416 if (sequences[i].replace)
417 strcpy(sequences[i].replace, str); 417 strcpy(sequences[i].replace, str);
diff --git a/legacy/embryo/src/bin/embryo_cc_sclist.c b/legacy/embryo/src/bin/embryo_cc_sclist.c
index aaf5a1282b..e908248066 100644
--- a/legacy/embryo/src/bin/embryo_cc_sclist.c
+++ b/legacy/embryo/src/bin/embryo_cc_sclist.c
@@ -288,6 +288,6 @@ delete_substtable(void)
288 int i; 288 int i;
289 289
290 delete_stringpairtable(&substpair); 290 delete_stringpairtable(&substpair);
291 for (i = 0; i < sizeof substindex / sizeof substindex[0]; i++) 291 for (i = 0; i < (int)(sizeof(substindex) / sizeof(substindex[0])); i++)
292 substindex[i] = NULL; 292 substindex[i] = NULL;
293} 293}