* .gitignore: Exclude netcf-transaction.init. --- .gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore index 8918703..310a773 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ src/datadir.h src/ncftool src/ncftransform src/netcf.syms +src/netcf-transaction.init tests/test-initscripts *.aux *.dvi
CC dutil_linux.lo dutil_linux.c: In function ‘run_program’: dutil_linux.c:201:11: warning: ‘childpid’ may be used uninitialized in this function
* src/dutil_linux.c (run_program): Initialize variable. --- src/dutil_linux.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/dutil_linux.c b/src/dutil_linux.c index 841c2a1..1a3a86e 100644 --- a/src/dutil_linux.c +++ b/src/dutil_linux.c @@ -1,7 +1,7 @@ /* * dutil_linux.c: Linux utility functions for driver backends. * - * Copyright (C) 2009 Red Hat Inc. + * Copyright (C) 2009, 2011 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -198,7 +198,7 @@ error: int run_program(struct netcf *ncf, const char *const *argv, char **output) {
- pid_t childpid; + pid_t childpid = -1; int exitstatus, waitret; char *argv_str; int ret = -1;
On 06/27/2011 10:16 AM, Eric Blake wrote:
CC dutil_linux.lo dutil_linux.c: In function ‘run_program’: dutil_linux.c:201:11: warning: ‘childpid’ may be used uninitialized in this function
ACK and pushed.
I'm wondering why I don't see this warning though. Here's the commandline (buried down in a script I never look at) I use to build netcf:
./autogen.sh --enable-compile-warnings=error --prefix=/usr --libdir=/usr/lib64 --disable-nls CFLAGS="-g -Wformat -Wformat-security -Winit-self -Wall -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Winline -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -Dlint" LDFLAGS=
- src/dutil_linux.c (run_program): Initialize variable.
src/dutil_linux.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/dutil_linux.c b/src/dutil_linux.c index 841c2a1..1a3a86e 100644 --- a/src/dutil_linux.c +++ b/src/dutil_linux.c @@ -1,7 +1,7 @@ /*
- dutil_linux.c: Linux utility functions for driver backends.
- Copyright (C) 2009 Red Hat Inc.
- Copyright (C) 2009, 2011 Red Hat Inc.
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
@@ -198,7 +198,7 @@ error: int run_program(struct netcf *ncf, const char *const *argv, char **output) {
- pid_t childpid;
- pid_t childpid = -1; int exitstatus, waitret; char *argv_str; int ret = -1;
On 06/27/2011 09:32 AM, Laine Stump wrote:
On 06/27/2011 10:16 AM, Eric Blake wrote:
CC dutil_linux.lo dutil_linux.c: In function ‘run_program’: dutil_linux.c:201:11: warning: ‘childpid’ may be used uninitialized in this function
ACK and pushed.
I'm wondering why I don't see this warning though. Here's the commandline (buried down in a script I never look at) I use to build netcf:
./autogen.sh --enable-compile-warnings=error --prefix=/usr --libdir=/usr/lib64 --disable-nls CFLAGS="-g -Wformat -Wformat-security
-g without -O is the culprit. Gcc doesn't warn about uninitialized variables except at -O2. You have to get smarter tools (like clang or coverity) to get those warnings at all compilation levels. :(
I really wish gcc would improve in this regards, but it has been a known open feature request for several years.
* .gnulib: Update to latest. ---
There have been 1623 upstream gnulib commits since we last touched the submodule. I'm not sure how many (if any) directly impact netcf, but we might as well use the latest.
.gnulib | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/.gnulib b/.gnulib index cc85acd..4aa8192 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit cc85acd7729af217a8f4820ecb36a9be816dba75 +Subproject commit 4aa819277730ab4b12c43267928cb9b9b9a4c8fd
On 06/27/2011 10:16 AM, Eric Blake wrote:
- .gnulib: Update to latest.
Sure, why not? ACK and pushed.
There have been 1623 upstream gnulib commits since we last touched the submodule. I'm not sure how many (if any) directly impact netcf, but we might as well use the latest.
.gnulib | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/.gnulib b/.gnulib index cc85acd..4aa8192 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit cc85acd7729af217a8f4820ecb36a9be816dba75 +Subproject commit 4aa819277730ab4b12c43267928cb9b9b9a4c8fd
netcf-devel@lists.fedorahosted.org