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