blob: 6f4dbf18e02ae66a8a9b6c9e70f7d1b3bc2cf9e9 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From a2e3a2e332c406ea3c56a8d74b61978107df68e6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 16 Jun 2017 22:23:08 -0700
4Subject: [PATCH 5/6] engine: Define SENTINEL
5
6Fix warnings with gcc7
7test.cpp:12: warning: missing sentinel in function call
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 lib/engine/utils.cpp | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/lib/engine/utils.cpp b/lib/engine/utils.cpp
17index 44579a1..8812a8c 100644
18--- a/lib/engine/utils.cpp
19+++ b/lib/engine/utils.cpp
20@@ -35,7 +35,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 #include "filesystem.h"
22 #include "utils.h"
23 #include "log/log.h"
24-
25+#define SENTINEL (const char *)0
26 /**
27 * @brief capture shell output as binary data
28 *
29@@ -139,7 +139,7 @@ int shell(const String &s)
30 * Before switching into new executable close all non standard
31 * file handlers.*/
32 close_parent_fds();
33- execl("/bin/sh", "sh", "-c", cmd.get(), NULL);
34+ execl("/bin/sh", "sh", "-c", cmd.get(), SENTINEL);
35 /* If we're here then execl failed*/
36 exit(-1);
37 break;
38--
392.13.1
40