summaryrefslogtreecommitdiffstats
path: root/generic/tclClockFmt.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-02-26 13:04:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-02-26 13:04:02 (GMT)
commit4cf5a76f8e6fa37f1c3bdc6637086910ad4e9a7d (patch)
tree13579969f34063ccd6291c717c4dff0dd2a97231 /generic/tclClockFmt.c
parent9fbca381f2511fb8789d98c3e93abd985ca60adf (diff)
downloadtcl-4cf5a76f8e6fa37f1c3bdc6637086910ad4e9a7d.zip
tcl-4cf5a76f8e6fa37f1c3bdc6637086910ad4e9a7d.tar.gz
tcl-4cf5a76f8e6fa37f1c3bdc6637086910ad4e9a7d.tar.bz2
More tweaks
Diffstat (limited to 'generic/tclClockFmt.c')
-rw-r--r--generic/tclClockFmt.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c
index 29869d6..a25be83 100644
--- a/generic/tclClockFmt.c
+++ b/generic/tclClockFmt.c
@@ -59,7 +59,6 @@ static void ClockFrmScnFinalize(ClientData clientData);
static inline int
_str2int(
int *out,
- register
const char *p,
const char *e,
int sign)
@@ -89,7 +88,6 @@ _str2int(
static inline int
_str2wideInt(
Tcl_WideInt *out,
- register
const char *p,
const char *e,
int sign)
@@ -510,7 +508,7 @@ static Tcl_HashKeyType ClockFmtScnStorageHashKeyType;
* Type definition of clock-format tcl object type.
*/
-Tcl_ObjType ClockFmtObjType = {
+static const Tcl_ObjType ClockFmtObjType = {
"clock-format", /* name */
ClockFmtObj_FreeInternalRep, /* freeIntRepProc */
ClockFmtObj_DupInternalRep, /* dupIntRepProc */
@@ -742,7 +740,7 @@ FindOrCreateFmtScnStorage(
if (fss == NULL && interp != NULL) {
Tcl_AppendResult(interp, "retrieve clock format failed \"",
strFmt ? strFmt : "", "\"", NULL);
- Tcl_SetErrorCode(interp, "TCL", "EINVAL", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "EINVAL", (char *)NULL);
}
return fss;
@@ -1460,7 +1458,7 @@ ClockScnToken_DayOfWeek_Proc(ClockFmtScnCmdArgs *opts,
}
if (val > 7) {
Tcl_SetObjResult(opts->interp, Tcl_NewStringObj("day of week is greater than 7", -1));
- Tcl_SetErrorCode(opts->interp, "CLOCK", "badDayOfWeek", NULL);
+ Tcl_SetErrorCode(opts->interp, "CLOCK", "badDayOfWeek", (char *)NULL);
return TCL_ERROR;
}
info->date.dayOfWeek = val;
@@ -2420,6 +2418,7 @@ ClockScan(
case (CLF_DAYOFYEAR|CLF_DAYOFMONTH):
/* miss month: ddd over dd (without month) */
flags &= ~CLF_DAYOFMONTH;
+ /* fallthrough */
case (CLF_DAYOFYEAR):
/* ddd over naked weekday */
if (!(flags & CLF_ISO8601YEAR)) {
@@ -2525,7 +2524,7 @@ overflow:
Tcl_SetObjResult(opts->interp, Tcl_NewStringObj("integer value too large to represent",
-1));
- Tcl_SetErrorCode(opts->interp, "CLOCK", "dateTooLarge", NULL);
+ Tcl_SetErrorCode(opts->interp, "CLOCK", "dateTooLarge", (char *)NULL);
goto done;
not_match:
@@ -2542,7 +2541,7 @@ not_match:
Tcl_GetString(opts->localeObj),
tok && tok->tokWord.start ? tok->tokWord.start : "NULL"));
#endif
- Tcl_SetErrorCode(opts->interp, "CLOCK", "badInputString", NULL);
+ Tcl_SetErrorCode(opts->interp, "CLOCK", "badInputString", (char *)NULL);
done: