summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/module-template.h3
-rw-r--r--runtime/msg.c4
-rw-r--r--runtime/stringbuf.c4
3 files changed, 7 insertions, 4 deletions
diff --git a/runtime/module-template.h b/runtime/module-template.h
index 9dd759a5..72a139c4 100644
--- a/runtime/module-template.h
+++ b/runtime/module-template.h
@@ -246,7 +246,8 @@ static rsRetVal dbgPrintInstInfo(void *pModData)\
instanceData *pData = NULL;
#define CODESTARTdbgPrintInstInfo \
- pData = (instanceData*) pModData;
+ pData = (instanceData*) pModData; \
+ (void)pData; /* prevent compiler warning if unused! */
#define ENDdbgPrintInstInfo \
RETiRet;\
diff --git a/runtime/msg.c b/runtime/msg.c
index 5b6392b2..d648bb92 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -3073,8 +3073,8 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
*pbMustBeFreed = 0;
break;
case PROP_SYS_UPTIME:
-# ifdef OS_SOLARIS
- pRes = (uchar*) "UPTIME NOT available under Solaris";
+# ifndef HAVE_SYSINFO
+ pRes = (uchar*) "UPTIME NOT available on this system";
*pbMustBeFreed = 0;
# else
{
diff --git a/runtime/stringbuf.c b/runtime/stringbuf.c
index e7fd72c2..5bca009d 100644
--- a/runtime/stringbuf.c
+++ b/runtime/stringbuf.c
@@ -482,6 +482,8 @@ rsRetVal cstrTrimTrailingWhiteSpace(cstr_t *pThis)
register uchar *pC;
rsCHECKVALIDOBJECT(pThis, OIDrsCStr);
+ if(pThis->iStrLen == 0)
+ goto done; /* empty string -> nothing to trim ;) */
i = pThis->iStrLen;
pC = pThis->pBuf + i - 1;
while(i > 0 && isspace((int)*pC)) {
@@ -492,7 +494,7 @@ rsRetVal cstrTrimTrailingWhiteSpace(cstr_t *pThis)
pThis->iStrLen = i;
pThis->pBuf[pThis->iStrLen] = '0'; /* we always have this space */
- return RS_RET_OK;
+done: return RS_RET_OK;
}
/* compare two string objects - works like strcmp(), but operates