From: Lionel Sambuc Date: Tue, 8 Oct 2013 09:45:49 +0000 (+0200) Subject: Fix some unintialized variables with -O3 X-Git-Tag: v3.3.0~761 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.dnssec-checkds.html?a=commitdiff_plain;h=refs%2Fchanges%2F15%2F1015%2F1;p=minix.git Fix some unintialized variables with -O3 Change-Id: I7c41b355a503f97501e9ecb768c77a80d1d7ef0c --- diff --git a/external/bsd/atf/dist/atf-c/detail/fs.c b/external/bsd/atf/dist/atf-c/detail/fs.c index 22cbca439..2b0c40dd9 100644 --- a/external/bsd/atf/dist/atf-c/detail/fs.c +++ b/external/bsd/atf/dist/atf-c/detail/fs.c @@ -797,7 +797,7 @@ atf_error_t atf_fs_mkdtemp(atf_fs_path_t *p) { atf_error_t err; - char *buf; + char *buf = NULL; if (!check_umask(S_IRWXU, S_IRWXU)) { err = invalid_umask_error(p, atf_fs_stat_dir_type, current_umask()); @@ -825,7 +825,7 @@ atf_error_t atf_fs_mkstemp(atf_fs_path_t *p, int *fdout) { atf_error_t err; - char *buf; + char *buf = NULL; int fd; if (!check_umask(S_IRWXU, S_IRWXU)) { diff --git a/external/bsd/atf/dist/atf-c/detail/process.c b/external/bsd/atf/dist/atf-c/detail/process.c index bc36b570e..daa12c43b 100644 --- a/external/bsd/atf/dist/atf-c/detail/process.c +++ b/external/bsd/atf/dist/atf-c/detail/process.c @@ -621,7 +621,7 @@ atf_process_exec_array(atf_process_status_t *s, void (*prehook)(void)) { atf_error_t err; - atf_process_child_t c; + atf_process_child_t c = { .m_pid = 0, .m_stdout = 1, .m_stderr = 2 }; struct exec_args ea = { prog, argv, prehook }; PRE(outsb == NULL || diff --git a/external/bsd/kyua-testers/dist/atf_list.c b/external/bsd/kyua-testers/dist/atf_list.c index b6d46a8c9..becc452e9 100644 --- a/external/bsd/kyua-testers/dist/atf_list.c +++ b/external/bsd/kyua-testers/dist/atf_list.c @@ -256,7 +256,7 @@ parse_test_case(FILE* input, FILE* output, char* name) while (!kyua_error_is_set(error) && fgets_no_newline(line, sizeof(line), input) != NULL && strcmp(line, "") != 0) { - char* key; char* value; + char* key = NULL; char* value = NULL; error = parse_property(line, &key, &value); if (!kyua_error_is_set(error)) { const char* out_key = rewrite_property(key); @@ -300,7 +300,7 @@ parse_tests(FILE* input, FILE* output) kyua_error_t error; do { - char* key; char* value; + char* key = NULL; char* value = NULL; error = parse_property(line, &key, &value); if (kyua_error_is_set(error)) break; diff --git a/external/bsd/kyua-testers/dist/fs.c b/external/bsd/kyua-testers/dist/fs.c index 6294828fc..a79b0bd75 100644 --- a/external/bsd/kyua-testers/dist/fs.c +++ b/external/bsd/kyua-testers/dist/fs.c @@ -518,7 +518,7 @@ kyua_fs_make_absolute(const char* original, char** const output) strcpy(*output, original); return kyua_error_ok(); } else { - char* current_path; + char* current_path= NULL; kyua_error_t error; error = kyua_fs_current_path(¤t_path); diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c index 6abdeb045..991c246c7 100644 --- a/usr.bin/make/suff.c +++ b/usr.bin/make/suff.c @@ -684,8 +684,8 @@ GNode * Suff_AddTransform(char *line) { GNode *gn; /* GNode of transformation rule */ - Suff *s, /* source suffix */ - *t; /* target suffix */ + Suff *s = NULL, /* source suffix */ + *t = NULL; /* target suffix */ LstNode ln; /* Node for existing transformation */ ln = Lst_Find(transforms, line, SuffGNHasNameP);