[Ltrace-devel] [PATCH] glob.c: Initialize a variable in globcomp()
Sedat Dilek
sedat.dilek at gmail.com
Thu Nov 8 19:06:50 UTC 2012
Fixes the following build-error:
...
glob.c: In function 'globcomp':
glob.c:190:9: error: 'regex' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
cc1: all warnings being treated as errors
Signed-off-by: Sedat Dilek <sedat.dilek at gmail.com>
---
glob.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/glob.c b/glob.c
index 6c5c9ef..cbb7a8f 100644
--- a/glob.c
+++ b/glob.c
@@ -183,7 +183,7 @@ glob_to_regex(const char *glob, char **retp)
int
globcomp(regex_t *preg, const char *glob, int cflags)
{
- char *regex;
+ char *regex = NULL;
int status = glob_to_regex(glob, ®ex);
if (status != 0)
return status;
--
1.7.9.5
More information about the Ltrace-devel
mailing list