summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/datetime.c5
-rw-r--r--runtime/queue.c3
-rw-r--r--runtime/rsconf.c6
3 files changed, 14 insertions, 0 deletions
diff --git a/runtime/datetime.c b/runtime/datetime.c
index 10ab3c64..53bc1657 100644
--- a/runtime/datetime.c
+++ b/runtime/datetime.c
@@ -900,6 +900,11 @@ time_t syslogTime2time_t(struct syslogTime *ts)
case 12:
MonthInDays = 334; //until 01 of December
break;
+ default: /* this cannot happen (and would be a program error)
+ * but we need the code to keep the compiler silent.
+ */
+ MonthInDays = 0; /* any value fits ;) */
+ break;
}
diff --git a/runtime/queue.c b/runtime/queue.c
index fbf77108..37809238 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -242,6 +242,9 @@ getQueueTypeName(queueType_t t)
case QUEUETYPE_DIRECT:
r = "Direct";
break;
+ default:
+ r = "unknown queue type";
+ break;
}
return r;
}
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
index dcaa1ad9..55fdd3bd 100644
--- a/runtime/rsconf.c
+++ b/runtime/rsconf.c
@@ -292,6 +292,9 @@ getNOW(eNOWType eNow, es_str_t **estr)
case NOW_MINUTE:
len = snprintf((char*) szBuf, sizeof(szBuf)/sizeof(uchar), "%2.2d", t.minute);
break;
+ default:
+ len = snprintf((char*) szBuf, sizeof(szBuf)/sizeof(uchar), "*invld eNow*");
+ break;
}
/* now create a string object out of it and hand that over to the var */
@@ -476,6 +479,9 @@ cnfGetVar(char *name, void *usrptr)
estr = msgGetCEEVarNew((msg_t*) usrptr, name+2);
else
estr = msgGetMsgVarNew((msg_t*) usrptr, (uchar*)name+1);
+ } else { /* if this happens, we have a program logic error */
+ estr = es_newStrFromCStr("err: var must start with $",
+ strlen("err: var must start with $"));
}
if(Debug) {
char *s;