Browse Source

silent a few warnings

Quentin Carbonneaux 9 years ago
parent
commit
09192cdeab
2 changed files with 6 additions and 4 deletions
  1. 2 3
      all.h
  2. 4 1
      sysv.c

+ 2 - 3
all.h

@@ -434,9 +434,8 @@ struct Typ {
 			Sint,
 			Sflt,
 			Styp,
-		};
-		uint type:3;
-		uint len:29; /* index in typ[] for Styp */
+		} type;
+		uint len; /* index in typ[] for Styp */
 	} (*seg)[NSeg+1];
 };
 

+ 4 - 1
sysv.c

@@ -26,8 +26,10 @@ classify(AClass *a, Typ *t, int *pn, int *pe)
 		seg = t->seg[n];
 		for (s=0; *pe<2; (*pe)++) {
 			cls = &a->cls[*pe];
-			for (; *pn<8 && seg[s].type!=Send; s++) {
+			for (; *pn<8; s++) {
 				switch (seg[s].type) {
+				case Send:
+					goto Done;
 				case Spad:
 					/* don't change anything */
 					break;
@@ -44,6 +46,7 @@ classify(AClass *a, Typ *t, int *pn, int *pe)
 				}
 				*pn += seg[s].len;
 			}
+		Done:
 			assert(*pn <= 8);
 			*pn = 0;
 		}