Lines 1-45
Link Here
|
1 |
--- src/error.c.orig 2014-11-21 17:41:49 UTC |
|
|
2 |
+++ src/error.c |
3 |
@@ -46,14 +46,22 @@ static char const * _error_do(int * code |
4 |
/* error_get */ |
5 |
char const * error_get(void) |
6 |
{ |
7 |
- return _error_do(NULL, NULL, NULL); |
8 |
+ va_list unused; |
9 |
+ |
10 |
+ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ |
11 |
+ |
12 |
+ return _error_do(NULL, NULL, unused); |
13 |
} |
14 |
|
15 |
|
16 |
/* error_get_code */ |
17 |
char const * error_get_code(int * code) |
18 |
{ |
19 |
- return _error_do(code, NULL, NULL); |
20 |
+ va_list unused; |
21 |
+ |
22 |
+ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ |
23 |
+ |
24 |
+ return _error_do(code, NULL, unused); |
25 |
} |
26 |
|
27 |
|
28 |
@@ -98,12 +106,16 @@ int error_print(char const * program) |
29 |
{ |
30 |
int code = 0; |
31 |
|
32 |
+ va_list unused; |
33 |
+ |
34 |
+ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ |
35 |
+ |
36 |
if(program != NULL) |
37 |
{ |
38 |
fputs(program, stderr); |
39 |
fputs(": ", stderr); |
40 |
} |
41 |
- fputs(_error_do(&code, NULL, NULL), stderr); |
42 |
+ fputs(_error_do(&code, NULL, unused), stderr); |
43 |
fputc('\n', stderr); |
44 |
return code; |
45 |
} |