]> granicus.if.org Git - php/commitdiff
Assert that all switch cases are covered
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 18 Sep 2020 10:25:29 +0000 (12:25 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 18 Sep 2020 12:53:02 +0000 (14:53 +0200)
ext/mysqli/mysqli.c

index 64601e66b4edafe33ab4f14c036510bbedb01272..9eb1885ea6ffbddd888ad60c8f64cac86d52e25e 100644 (file)
@@ -1094,6 +1094,7 @@ void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend
                                        case 3:llval = (my_ulonglong)  bit_uint3korr(row[i]);break;
                                        case 2:llval = (my_ulonglong)  bit_uint2korr(row[i]);break;
                                        case 1:llval = (my_ulonglong)  uint1korr(row[i]);break;
+                                       EMPTY_SWITCH_DEFAULT_CASE()
                                }
                                /* even though lval is declared as unsigned, the value
                                 * may be negative. Therefor we cannot use MYSQLI_LLU_SPEC and must