summaryrefslogtreecommitdiffstats
path: root/plugins/omstdout
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-11-28 10:11:14 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-11-28 10:11:14 +0100
commitf161dfefd2455547847f0355b7a3a87063780a43 (patch)
tree8cad7e652091bfa642af77b75e496b8c0bfecf26 /plugins/omstdout
parentd9df6e977554f0bd1d42093ea62ca15dab223ff3 (diff)
downloadrsyslog-f161dfefd2455547847f0355b7a3a87063780a43.tar.gz
rsyslog-f161dfefd2455547847f0355b7a3a87063780a43.tar.bz2
rsyslog-f161dfefd2455547847f0355b7a3a87063780a43.zip
silence some primarily cosmetic compiler warning messages
Diffstat (limited to 'plugins/omstdout')
-rw-r--r--plugins/omstdout/omstdout.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/omstdout/omstdout.c b/plugins/omstdout/omstdout.c
index 65818c27..59f9c8bb 100644
--- a/plugins/omstdout/omstdout.c
+++ b/plugins/omstdout/omstdout.c
@@ -136,9 +136,13 @@ CODESTARTdoAction
toWrite = (char*) ppString[0];
}
len = strlen(toWrite);
- write(1, toWrite, len); /* 1 is stdout! */
+ /* the following if's are just to silence compiler warnings. If someone
+ * actually intends to use this module in production (why???), this code
+ * needs to be more solid. -- rgerhards, 2012-11-28
+ */
+ if(write(1, toWrite, len)) {}; /* 1 is stdout! */
if(pData->bEnsureLFEnding && toWrite[len-1] != '\n') {
- write(1, "\n", 1); /* write missing LF */
+ if(write(1, "\n", 1)) {}; /* write missing LF */
}
ENDdoAction