summaryrefslogtreecommitdiffstats
path: root/generic/tclLoad.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2025-06-02 14:18:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2025-06-02 14:18:14 (GMT)
commit56ec7b2901a5eb8c2d48aba65eee5eb82640b152 (patch)
tree77a3f7014e0fcca3ed885427f2b25851bdc4158e /generic/tclLoad.c
parentf145c7fbd2a82a5f77eae1301caceb376bc4f8dd (diff)
downloadtcl-56ec7b2901a5eb8c2d48aba65eee5eb82640b152.zip
tcl-56ec7b2901a5eb8c2d48aba65eee5eb82640b152.tar.gz
tcl-56ec7b2901a5eb8c2d48aba65eee5eb82640b152.tar.bz2
Backport: Add [[unreachable]] and [[fallthrough]] from C23 (where available)
Diffstat (limited to 'generic/tclLoad.c')
-rw-r--r--generic/tclLoad.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 96691cc..7e68744 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -156,13 +156,14 @@ Tcl_LoadObjCmd(
&index) != TCL_OK) {
return TCL_ERROR;
}
- ++objv; --objc;
+ ++objv;
+ --objc;
if (LOAD_GLOBAL == index) {
flags |= TCL_LOAD_GLOBAL;
} else if (LOAD_LAZY == index) {
flags |= TCL_LOAD_LAZY;
} else {
- break;
+ break;
}
}
if ((objc < 2) || (objc > 4)) {
@@ -598,6 +599,8 @@ Tcl_UnloadObjCmd(
case UNLOAD_LAST: /* -- */
i++;
goto endOfForLoop;
+ default:
+ TCL_UNREACHABLE();
}
}
endOfForLoop: