On Mon, Apr 13, 2009 at 03:49:06PM +0530, Bharata B Rao wrote: > On Mon, Apr 06, 2009 at 02:00:15PM +0530, Balbir Singh wrote: > > * Bharata B Rao <[email protected]> [2009-04-06 13:13:14]: > > > > > - char *token, *saveptr; > > > + char *token, *saveptr = NULL; > > > > > > > I am not convinced about this part? Why do we need to initialize > > saveptr to NULL? Look at another place where we use savedptr for > > strtok_r and get no warnings. It could mean one of two things > > Ok, Here is the updated patch without the changes to saveptr. >
Thanks, applied > Regards, > Bharata. > > Fix a few compilation warnings in api.c > > gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -Wall -MT api.lo -MD -MP -MF > .deps/api.Tpo -c api.c -fPIC -DPIC -o .libs/api.o > api.c:52:1: warning: "VERSION" redefined > In file included from ./libcgroup-internal.h:21, > from api.c:31: > ../config.h:129:1: warning: this is the location of the previous definition > api.c: In function 'cgroup_parse_rules': > api.c:353: warning: implicit declaration of function 'isblank' > api.c: In function 'cgroup_modify_cgroup': > api.c:1073: warning: implicit declaration of function 'asprintf' > > This patch fixes the warning arising due to isblank, asprintf and getline. > > Signed-off-by: Bharata B Rao <[email protected]> > --- > src/api.c | 4 ++++ > 1 file changed, 4 insertions(+) > > --- a/src/api.c > +++ b/src/api.c > @@ -25,6 +25,10 @@ > * for mistakes in APIs for reading statistics. > */ > > +#ifndef _GNU_SOURCE > +#define _GNU_SOURCE > +#endif > + > #include <dirent.h> > #include <errno.h> > #include <libcgroup.h> -- regards, Dhaval ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
