* Remove some more compiler warnings.
authorcarl <cecodere@yahoo.ca>
Sat, 23 Feb 2019 16:46:05 +0000 (00:46 +0800)
committercarl <cecodere@yahoo.ca>
Sat, 23 Feb 2019 16:46:05 +0000 (00:46 +0800)
lang/cem/cemcom.ansi/arith.c
lang/cem/cemcom.ansi/code.str
lang/cem/cemcom.ansi/ival.g
lang/cem/cemcom.ansi/options.c
lang/cem/cemcom.ansi/struct.c
lang/cem/cemcom.ansi/type.c

index 10d1499..6504a73 100644 (file)
@@ -537,7 +537,7 @@ void any2opnd(register struct expr **expp, int oper)
        case CHAR:
        case SHORT:
        case ENUM:
-       /* case FLOAT:  /* not necessary anymore */
+       /* case FLOAT:  *//* not necessary anymore */
                any2arith(expp, oper);
                break;
        case ARRAY:
index b377039..480d79e 100644 (file)
@@ -36,6 +36,7 @@ void end_code(void);
 struct expr;
 struct def;
 struct idf;
+struct decspecs;
 
 label code_string(char* val, int len);
 void def_strings(register struct string_cst *sc);
index 80c6d1d..398343e 100644 (file)
@@ -455,7 +455,7 @@ void check_and_pad(struct expr **expp, struct type **tpp)
                /* next selector is aligned by adding extra zeroes */\r
                if (sd->sd_sdef)\r
                        zero_bytes(sd);\r
-               while (sd = sd->sd_sdef) { /* pad remaining selectors   */\r
+               while ( (sd = sd->sd_sdef)!=0) { /* pad remaining selectors     */\r
                        pad(sd->sd_type);\r
                        if (sd->sd_sdef)\r
                                zero_bytes(sd);\r
index 62864f5..0c37c85 100644 (file)
@@ -49,7 +49,7 @@ next_option:                  /* to allow combined one-char options */
                break;
 
        case '-':
-               options[*text++] = 1;   /* flags, debug options etc.    */
+               options[(int)*text++] = 1;      /* flags, debug options etc.    */
                goto next_option;
 
 #ifndef LINT
@@ -127,7 +127,7 @@ next_option:                        /* to allow combined one-char options */
                register arith sz, algn;
                char c;
 
-               while (c = *text++)     {
+               while ( (c = *text++) !=0)      {
                        sz = txt2int(&text);
                        algn = 0;
                        if (*text == '.')       {
index fbba71a..7b6aedd 100644 (file)
@@ -283,7 +283,7 @@ struct sdef *idf2sdef(
        }
        
        /* Tp not met; take an identification. */
-       if (sdef = idf->id_sdef)        {
+       if ( (sdef = idf->id_sdef) )    {
                /* There is an identification */
                error("illegal use of selector %s", idf->id_text);
                return sdef;
index ff3a6ea..750ed9a 100644 (file)
@@ -273,7 +273,7 @@ void completed(struct type *tp)
        case STRUCT:
        case UNION:
        case ENUM:
-               while (etp = etp->next)
+               while ( (etp = etp->next) !=0)
                {
                        if (!etp->tp_sdef)
                                etp->tp_sdef = tp->tp_sdef;