check for repeated labels on the same block */
| 1197 | |
| 1198 | /* check for repeated labels on the same block */ |
| 1199 | static void checkrepeated (FuncState *fs, Labellist *ll, TString *label) { |
| 1200 | int i; |
| 1201 | for (i = fs->bl->firstlabel; i < ll->n; i++) { |
| 1202 | if (luaS_eqstr(label, ll->arr[i].name)) { |
| 1203 | const char *msg = luaO_pushfstring(fs->ls->L, |
| 1204 | "label " LUA_QS " already defined on line %d", |
| 1205 | getstr(label), ll->arr[i].line); |
| 1206 | semerror(fs->ls, msg); |
| 1207 | } |
| 1208 | } |
| 1209 | } |
| 1210 | |
| 1211 | |
| 1212 | /* skip no-op statements */ |
no test coverage detected