Apparently, a void cast doesn't override warn_unused_result.
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 24 Feb 2009 20:52:44 +0000 (20:52 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 24 Feb 2009 20:52:44 +0000 (20:52 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178381 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c

index 4f86372..7c50ff1 100644 (file)
@@ -3302,7 +3302,10 @@ int main(int argc, char *argv[])
                        int cpipe[2];
 
                        /* PIPE signal ensures that astcanary dies when Asterisk dies */
-                       (void) pipe(cpipe);
+                       if (pipe(cpipe)) {
+                               fprintf(stderr, "Unable to open pipe for canary process: %s\n", strerror(errno));
+                               exit(1);
+                       }
                        canary_pipe = cpipe[0];
 
                        snprintf(canary_filename, sizeof(canary_filename), "%s/alt.asterisk.canary.tweet.tweet.tweet", ast_config_AST_RUN_DIR);