From f161dfefd2455547847f0355b7a3a87063780a43 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 28 Nov 2012 10:11:14 +0100 Subject: silence some primarily cosmetic compiler warning messages --- runtime/debug.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'runtime/debug.c') diff --git a/runtime/debug.c b/runtime/debug.c index 307a8bb8..1d306dbd 100644 --- a/runtime/debug.c +++ b/runtime/debug.c @@ -902,8 +902,12 @@ do_dbgprint(uchar *pszObjName, char *pszMsg, size_t lenMsg) lenCopy = lenMsg; memcpy(pszWriteBuf + offsWriteBuf, pszMsg, lenCopy); offsWriteBuf += lenCopy; - if(stddbg != -1) write(stddbg, pszWriteBuf, offsWriteBuf); - if(altdbg != -1) write(altdbg, pszWriteBuf, offsWriteBuf); + /* the write is included in an "if" just to silence compiler + * warnings. Here, we really don't care if the write fails, we + * have no good response to that in any case... -- rgerhards, 2012-11-28 + */ + if(stddbg != -1) if(write(stddbg, pszWriteBuf, offsWriteBuf)){}; + if(altdbg != -1) if(write(altdbg, pszWriteBuf, offsWriteBuf)){}; bWasNL = (pszMsg[lenMsg - 1] == '\n') ? 1 : 0; } -- cgit v1.2.3