From d81079db6796809009a0885edd195aec7be005dd Mon Sep 17 00:00:00 2001 From: David Sharp Date: Mon, 13 Nov 2017 14:00:41 -0800 Subject: [PATCH] configure: Fix uninitialized warnings in c-library.m4 Fixes for: - PGAC_FUNC_GETTIMOFDAY_1ARG and - PGAC_FUNC_GETPWUID_R_5ARG --- config/c-library.m4 | 14 +++++++------- configure | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/c-library.m4 b/config/c-library.m4 index 74754b20e8..49fc0c85c1 100644 --- a/config/c-library.m4 +++ b/config/c-library.m4 @@ -62,8 +62,8 @@ AC_DEFUN([PGAC_FUNC_GETTIMEOFDAY_1ARG], [AC_CACHE_CHECK(whether gettimeofday takes only one argument, pgac_cv_func_gettimeofday_1arg, [AC_TRY_COMPILE([#include ], -[struct timeval *tp; -struct timezone *tzp; +[struct timeval *tp = 0; +struct timezone *tzp = 0; gettimeofday(tp,tzp);], [pgac_cv_func_gettimeofday_1arg=no], [pgac_cv_func_gettimeofday_1arg=yes])]) @@ -86,11 +86,11 @@ AC_DEFUN([PGAC_FUNC_GETPWUID_R_5ARG], pgac_cv_func_getpwuid_r_5arg, [AC_TRY_COMPILE([#include #include ], -[uid_t uid; -struct passwd *space; -char *buf; -size_t bufsize; -struct passwd **result; +[uid_t uid = 0; +struct passwd *space = 0; +char *buf = 0; +size_t bufsize = 0; +struct passwd **result = 0; getpwuid_r(uid, space, buf, bufsize, result);], [pgac_cv_func_getpwuid_r_5arg=yes], [pgac_cv_func_getpwuid_r_5arg=no])]) diff --git a/configure b/configure index a9a11c91d9..bd69fc8cba 100755 --- a/configure +++ b/configure @@ -14841,8 +14841,8 @@ else int main () { -struct timeval *tp; -struct timezone *tzp; +struct timeval *tp = 0; +struct timezone *tzp = 0; gettimeofday(tp,tzp); ; return 0; @@ -16362,11 +16362,11 @@ else int main () { -uid_t uid; -struct passwd *space; -char *buf; -size_t bufsize; -struct passwd **result; +uid_t uid = 0; +struct passwd *space = 0; +char *buf = 0; +size_t bufsize = 0; +struct passwd **result = 0; getpwuid_r(uid, space, buf, bufsize, result); ; return 0; -- GitLab