]> thyrsus.com Git - intercal.git/commitdiff
Fix some splint warnings in feh2.c, ick.h also updated.
authorArvid Norlander <anmaster@tele2.se>
Mon, 24 Nov 2008 17:45:57 +0000 (12:45 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 26 Aug 2010 00:35:29 +0000 (20:35 -0400)
src/feh2.c
src/ick.h

index 2790d3bc046d44a0ebf5a1b62285cd28c5808e0d..827a6396139f8b22118d41737e4e9dd3d76f007f 100644 (file)
@@ -459,7 +459,7 @@ void prexpr(node *np, FILE *fp, int freenode);
  * If the order of statement-token defines in parser.y ever changes,
  * this will need to be reordered.
  */
-const char *enablersm1[MAXTYPES+1] =
+/*@observer@*/ const char *enablersm1[MAXTYPES+1] =
 {
     "UNKNOWN", /* AIS: so comments can be ABSTAINED/REINSTATED */
     "GETS",
@@ -1594,10 +1594,10 @@ static int prunknownstr(node *np, FILE* fp)
   case BADCHAR:
     if (np->constant > 256)
       (void) fprintf(fp, "o%xx%x",
-                    (int)(np->constant / 256),
-                    (int)(np->constant % 256));
+                    (unsigned int)(np->constant / 256),
+                    (unsigned int)(np->constant % 256));
     else
-      (void) fprintf(fp, "u%x", (int)np->constant);
+      (void) fprintf(fp, "u%x", (unsigned int)np->constant);
     return 2;
   case US_ID: (void) fputc((char)np->constant, fp); return 0;
   case US_ELEM: (void) fputc(';', fp); return 1;
index 60fefe3d818603adf71de5bd37d4c26c8c69bee7..e45231df8db2ddc10a69a77a95674d170a2aa74b 100644 (file)
--- a/src/ick.h
+++ b/src/ick.h
@@ -129,7 +129,7 @@ extern int tuplecount;
 /*@dependent@*/ extern tuple *optuple; /* AIS: The tuple currently being optimized */
 
 extern const char **enablers;
-extern const char *enablersm1[MAXTYPES+1];
+/*@observer@*/ extern const char *enablersm1[MAXTYPES+1];
 extern const assoc vartypes[];
 
 /* the lexical analyzer keeps copies of the source logical lines */