diff options
author | Sean Bruno <sbruno@FreeBSD.org> | 2014-11-27 19:18:13 +0000 |
---|---|---|
committer | Sean Bruno <sbruno@FreeBSD.org> | 2014-11-27 19:18:13 +0000 |
commit | 5e7269ce123b96b9eab6b8fc851ce175baea73ef (patch) | |
tree | 70d37667f0962e7357df7a3e29050583cd0c06df /devel/deforaos-libsystem | |
parent | bf7cdf5a813ffab8087b89ab823175c18dc6a55d (diff) | |
download | ports-5e7269ce123b96b9eab6b8fc851ce175baea73ef.tar.gz ports-5e7269ce123b96b9eab6b8fc851ce175baea73ef.zip |
Notes
Diffstat (limited to 'devel/deforaos-libsystem')
-rw-r--r-- | devel/deforaos-libsystem/files/patch-src_error.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/devel/deforaos-libsystem/files/patch-src_error.c b/devel/deforaos-libsystem/files/patch-src_error.c new file mode 100644 index 000000000000..2ffd5e037cc0 --- /dev/null +++ b/devel/deforaos-libsystem/files/patch-src_error.c @@ -0,0 +1,45 @@ +--- src/error.c.orig 2014-11-21 17:41:49 UTC ++++ src/error.c +@@ -46,14 +46,22 @@ static char const * _error_do(int * code + /* error_get */ + char const * error_get(void) + { +- return _error_do(NULL, NULL, NULL); ++ va_list unused; ++ ++ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ ++ ++ return _error_do(NULL, NULL, unused); + } + + + /* error_get_code */ + char const * error_get_code(int * code) + { +- return _error_do(code, NULL, NULL); ++ va_list unused; ++ ++ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ ++ ++ return _error_do(code, NULL, unused); + } + + +@@ -98,12 +106,16 @@ int error_print(char const * program) + { + int code = 0; + ++ va_list unused; ++ ++ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ ++ + if(program != NULL) + { + fputs(program, stderr); + fputs(": ", stderr); + } +- fputs(_error_do(&code, NULL, NULL), stderr); ++ fputs(_error_do(&code, NULL, unused), stderr); + fputc('\n', stderr); + return code; + } |