Enlightenment CVS committal
Author : tsauerbeck
Project : e17
Module : libs/embryo
Dir : e17/libs/embryo/src/bin
Modified Files:
embryo_cc_sc1.c embryo_cc_sc2.c embryo_cc_sc3.c
embryo_cc_sc6.c embryo_cc_sc7.c embryo_cc_sclist.c
embryo_main.c
Log Message:
fixed some warnings
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc1.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- embryo_cc_sc1.c 6 Jun 2004 15:43:05 -0000 1.11
+++ embryo_cc_sc1.c 11 Jul 2004 09:50:42 -0000 1.12
@@ -19,7 +19,7 @@
* must not be misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source
* distribution.
- * Version: $Id: embryo_cc_sc1.c,v 1.11 2004/06/06 15:43:05 digitalfallout Exp $
+ * Version: $Id: embryo_cc_sc1.c,v 1.12 2004/07/11 09:50:42 tsauerbeck Exp $
*/
#include <assert.h>
#include <ctype.h>
@@ -67,7 +67,6 @@
static void doarg(char *name, int ident, int offset,
int tags[], int numtags,
int fpublic, int fconst, arginfo * arg);
-static void dump_referrers(symbol * root, FILE * log, char *sourcefile);
static void reduce_referrers(symbol * root);
static int testsymbols(symbol * root, int level,
int testlabs, int testconst);
@@ -581,11 +580,11 @@
litmax = sDEF_LITMAX; /* current size of the literal table */
errnum = 0; /* number of errors */
warnnum = 0; /* number of warnings */
-/* // sc_debug=sCHKBOUNDS; /* by default: bounds checking+assertions */
+/* sc_debug=sCHKBOUNDS; by default: bounds checking+assertions */
sc_debug = 0; /* by default: no debug */
charbits = 8; /* a "char" is 8 bits */
sc_packstr = FALSE; /* strings are unpacked by default */
-/* // sc_compress=TRUE; /* compress output bytecodes */
+/* sc_compress=TRUE; compress output bytecodes */
sc_compress = FALSE; /* compress output bytecodes */
sc_needsemicolon = FALSE; /* semicolon required to terminate
* expressions? */
@@ -651,35 +650,6 @@
#endif
}
-static int
-toggle_option(char *optptr, int option)
-{
- switch (*(optptr + 1))
- {
- case '\0':
- option = !option;
- break;
- case '-':
- option = FALSE;
- break;
- case '+':
- option = TRUE;
- break;
- default:
- about();
- } /* switch */
- return option;
-}
-
-/* Parsing command line options is indirectly recursive: parseoptions()
- * calls parserespf() to handle options in a a response file and
- * parserespf() calls parseoptions() at its turn after having created
- * an "option list" from the contents of the file.
- */
-static void parserespf(char *filename, char *iname,
- char *oname, char *ename,
- char *pname, char *rname);
-
static void
parseoptions(int argc, char **argv, char *iname, char *oname,
char *ename, char *pname, char *rname)
@@ -901,12 +871,6 @@
} /* if */
}
-static int
-waitkey(void)
-{
- return TRUE;
-}
-
static void
setcaption(void)
{
@@ -1423,7 +1387,7 @@
* of a global variable or to that of a local variable at a lower
* level might indicate a bug.
*/
- if ((sym = findloc(name)) != NULL && sym->compound != nestlevel
+ if (((sym = findloc(name)) != NULL && sym->compound != nestlevel)
|| findglb(name) != NULL)
error(219, name); /* variable shadows another symbol */
while (matchtoken('['))
@@ -2114,7 +2078,7 @@
} /* switch */
if (tags[0] == 0
- && (opertok != '=' && tags[1] == 0 || opertok == '=' && resulttag == 0))
+ && ((opertok != '=' && tags[1] == 0) || (opertok == '=' && resulttag == 0)))
error(64); /* cannot change predefined operators */
/* change the operator name */
@@ -2298,7 +2262,7 @@
if (native)
{
if (tok == tPUBLIC || tok == tSTOCK || tok == tSTATIC ||
- tok == tSYMBOL && *str == PUBLIC_CHAR)
+ (tok == tSYMBOL && *str == PUBLIC_CHAR))
error(42); /* invalid combination of class specifiers */
}
else
@@ -2426,7 +2390,7 @@
tag = (firsttag >= 0) ? firsttag : sc_addtag(NULL);
tok = lex(&val, &str);
assert(!fpublic);
- if (tok == tNATIVE || tok == tPUBLIC && stock)
+ if (tok == tNATIVE || (tok == tPUBLIC && stock))
error(42); /* invalid combination of class specifiers */
if (tok == tOPERATOR)
{
@@ -2798,7 +2762,7 @@
error(10); /* illegal function or declaration */
} /* switch */
}
- while (tok == '&' || tok == tLABEL || tok == tCONST || tok != tELLIPS &&
matchtoken(',')); /* more? */
+ while (tok == '&' || tok == tLABEL || tok == tCONST || (tok != tELLIPS &&
matchtoken(','))); /* more? */
/* if the next token is not ",", it should be ")" */
needtoken(')');
} /* if */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc2.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- embryo_cc_sc2.c 10 Jun 2004 08:52:35 -0000 1.7
+++ embryo_cc_sc2.c 11 Jul 2004 09:50:42 -0000 1.8
@@ -18,7 +18,7 @@
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
- * Version: $Id: embryo_cc_sc2.c,v 1.7 2004/06/10 08:52:35 raster Exp $
+ * Version: $Id: embryo_cc_sc2.c,v 1.8 2004/07/11 09:50:42 tsauerbeck Exp $
*/
#include <assert.h>
#include <stdio.h>
@@ -1176,9 +1176,9 @@
sym = findloc(str);
if (sym == NULL)
sym = findglb(str);
- if (sym == NULL || sym->ident != iFUNCTN
+ if (sym == NULL || (sym->ident != iFUNCTN
&& sym->ident != iREFFUNC
- && (sym->usage & uDEFINE) == 0)
+ && (sym->usage & uDEFINE) == 0))
{
error(17, str); /* undefined symbol */
}
@@ -1974,7 +1974,7 @@
lptr += 1; /* skip colon */
} /* if */
}
- else if (*lptr == '\"' || *lptr == sc_ctrlchar && *(lptr + 1) == '\"')
+ else if (*lptr == '\"' || (*lptr == sc_ctrlchar && *(lptr + 1) == '\"'))
{ /* unpacked string literal */
_lextok = tSTRING;
rawstring = (*lptr == sc_ctrlchar);
@@ -1990,10 +1990,10 @@
else
error(37); /* invalid (non-terminated) string */
}
- else if (*lptr == '!' && *(lptr + 1) == '\"'
- || *lptr == '!' && *(lptr + 1) == sc_ctrlchar && *(lptr + 2) == '\"'
- || *lptr == sc_ctrlchar && *(lptr + 1) == '!'
- && *(lptr + 2) == '\"')
+ else if ((*lptr == '!' && *(lptr + 1) == '\"')
+ || (*lptr == '!' && *(lptr + 1) == sc_ctrlchar && *(lptr + 2) == '\"')
+ || (*lptr == sc_ctrlchar && *(lptr + 1) == '!'
+ && *(lptr + 2) == '\"'))
{ /* packed string literal */
_lextok = tSTRING;
rawstring = (*lptr == sc_ctrlchar || *(lptr + 1) == sc_ctrlchar);
@@ -2082,7 +2082,7 @@
int tok;
tok = lex(&val, &str);
- if (tok == token || token == tTERM && (tok == ';' || tok == tENDEXPR))
+ if (tok == token || (token == tTERM && (tok == ';' || tok == tENDEXPR)))
{
return 1;
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc3.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- embryo_cc_sc3.c 15 May 2004 05:39:44 -0000 1.4
+++ embryo_cc_sc3.c 11 Jul 2004 09:50:42 -0000 1.5
@@ -18,7 +18,7 @@
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
- * Version: $Id: embryo_cc_sc3.c,v 1.4 2004/05/15 05:39:44 raster Exp $
+ * Version: $Id: embryo_cc_sc3.c,v 1.5 2004/07/11 09:50:42 tsauerbeck Exp $
*/
#include <assert.h>
#include <stdio.h>
@@ -1002,7 +1002,7 @@
if (lval3.sym->dim.array.level != level)
return error(48); /* array dimensions must match */
else if (lval3.sym->dim.array.length < val
- || exactmatch && lval3.sym->dim.array.length > val)
+ || (exactmatch && lval3.sym->dim.array.length > val))
return error(47); /* array sizes must match */
if (level > 0)
{
@@ -1544,8 +1544,8 @@
if (close == ']')
{
/* normal array index */
- if (lval2.constval < 0 || sym->dim.array.length != 0
- && sym->dim.array.length <= lval2.constval)
+ if (lval2.constval < 0 || (sym->dim.array.length != 0
+ && sym->dim.array.length <= lval2.constval))
error(32, sym->name); /* array index out of bounds */
if (lval2.constval != 0)
{
@@ -1561,10 +1561,10 @@
else
{
/* character index */
- if (lval2.constval < 0 || sym->dim.array.length != 0
+ if (lval2.constval < 0 || (sym->dim.array.length != 0
&& sym->dim.array.length * ((8 * sizeof(cell)) /
charbits) <=
- (ucell) lval2.constval)
+ (ucell) lval2.constval))
error(32, sym->name); /* array index out of bounds */
if (lval2.constval != 0)
{
@@ -2094,11 +2094,11 @@
* function argument; a literal string may be
smaller than
* the function argument.
*/
- if (lval.constval > 0
- && arg[argidx].dim[0] != lval.constval
- || lval.constval < 0
+ if ((lval.constval > 0
+ && arg[argidx].dim[0] != lval.constval)
+ || (lval.constval < 0
&& arg[argidx].dim[0] <
- -lval.constval)
+ -lval.constval))
error(47); /* array sizes must match */
} /* if */
} /* if */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc6.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- embryo_cc_sc6.c 20 Apr 2004 03:50:11 -0000 1.4
+++ embryo_cc_sc6.c 11 Jul 2004 09:50:42 -0000 1.5
@@ -18,7 +18,7 @@
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
- * Version: $Id: embryo_cc_sc6.c,v 1.4 2004/04/20 03:50:11 raster Exp $
+ * Version: $Id: embryo_cc_sc6.c,v 1.5 2004/07/11 09:50:42 tsauerbeck Exp $
*/
#include <assert.h>
#include <stdio.h>
@@ -1023,8 +1023,8 @@
instr = skipwhitespace(line);
/* ignore empty lines and labels (labels have a special syntax, so these
* must be parsed separately) */
- if (*instr == '\0' || tolower(*instr) == 'l'
- && *(instr + 1) == '.')
+ if (*instr == '\0' || (tolower(*instr) == 'l'
+ && *(instr + 1) == '.'))
continue;
/* get to the end of the instruction (make use of the '\n' that fgets()
* added at the end of the line; this way we will *always* drop on a
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sc7.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- embryo_cc_sc7.c 15 May 2004 05:39:44 -0000 1.3
+++ embryo_cc_sc7.c 11 Jul 2004 09:50:42 -0000 1.4
@@ -35,7 +35,7 @@
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
- * Version: $Id: embryo_cc_sc7.c,v 1.3 2004/05/15 05:39:44 raster Exp $
+ * Version: $Id: embryo_cc_sc7.c,v 1.4 2004/07/11 09:50:42 tsauerbeck Exp $
*/
#include <assert.h>
#include <stdio.h>
@@ -490,18 +490,18 @@
case ' ':
if (*start != '\t' && *start != ' ')
return FALSE;
- while (start < end && *start == '\t' || *start == ' ')
+ while ((start < end && *start == '\t') || *start == ' ')
start++;
break;
case '!':
- while (start < end && *start == '\t' || *start == ' ')
+ while ((start < end && *start == '\t') || *start == ' ')
start++; /* skip trailing white space */
if (*start != '\n')
return FALSE;
assert(*(start + 1) == '\0');
start += 2; /* skip '\n' and '\0' */
if (*(pattern + 1) != '\0')
- while (start < end && *start == '\t' || *start == ' ')
+ while ((start < end && *start == '\t') || *start == ' ')
start++; /* skip leading white space of next instruction */
break;
default:
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_cc_sclist.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- embryo_cc_sclist.c 20 Apr 2004 03:50:11 -0000 1.2
+++ embryo_cc_sclist.c 11 Jul 2004 09:50:42 -0000 1.3
@@ -21,7 +21,7 @@
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
- * Version: $Id: embryo_cc_sclist.c,v 1.2 2004/04/20 03:50:11 raster Exp $
+ * Version: $Id: embryo_cc_sclist.c,v 1.3 2004/07/11 09:50:42 tsauerbeck Exp $
*/
#include <assert.h>
#include <stdlib.h>
@@ -239,7 +239,7 @@
{
stringpair *cur;
- assert(c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' || c == '_');
+ assert((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_');
assert('A' < '_' && '_' < 'z');
for (cur = substpair.next; cur != NULL && cur->first[0] != c;
@@ -270,7 +270,7 @@
assert(name != NULL);
assert(length > 0);
- assert(*name >= 'A' && *name <= 'Z' || *name >= 'a' && *name <= 'z'
+ assert((*name >= 'A' && *name <= 'Z') || (*name >= 'a' && *name <= 'z')
|| *name == '_');
item = substindex[(int)*name - 'A'];
if (item != NULL)
@@ -285,7 +285,7 @@
assert(name != NULL);
assert(length > 0);
- assert(*name >= 'A' && *name <= 'Z' || *name >= 'a' && *name <= 'z'
+ assert((*name >= 'A' && *name <= 'Z') || (*name >= 'a' && *name <= 'z')
|| *name == '_');
item = substindex[(int)*name - 'A'];
if (item != NULL)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/bin/embryo_main.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- embryo_main.c 29 Mar 2004 11:58:56 -0000 1.6
+++ embryo_main.c 11 Jul 2004 09:50:42 -0000 1.7
@@ -130,7 +130,6 @@
static Embryo_Cell
exported_rec(Embryo_Program *ep, Embryo_Cell *params)
{
- Embryo_Cell *cptr;
Embryo_Function fn;
Embryo_Cell ret, arg1, arg2;
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs