Commits

Lenard Lindstrom committed 888562b

replace another ambiguous switch statement default clause

See changeset 35c6f1cb33b5.

Comments (0)

Files changed (1)

 {
     int i = 0;
 
+    /* Skip size/byte order prefix or item count */
     switch (format[i]) {
 
     case '@':
     case '7':
     case '8':
     case '9':
+        /* Only skip if for pad bytes */
         if (format[i + 1] == 'x') {
             ++i;
         }
         break;
-    default:
-        /* Unrecognized */
-        break;
+
+    /* default: assume it is a format character */
     }
     switch (format[i]) {
 
     case 'Q':
         ++i;
         break;
-    default:
-        /* Unrecognized */
-        break;
+
+    /* default: unrecognized character; raise error later */
     }
     if (format[i] != '\0') {
         PyErr_SetString(PyExc_ValueError, "Unsupport array item type");