* [LTP] [PATCH 6/6] ltp: enable -Wall for doio compiles @ 2011-04-04 12:08 Alex Elder 0 siblings, 0 replies; 2+ messages in thread From: Alex Elder @ 2011-04-04 12:08 UTC (permalink / raw) To: ltp-list Now that the code has been made modern and a few minor problems have been addressed, enable the "-Wall" flag for gcc when building files under "testcases/kernel/fs/doio/". Signed-off-by: Alex Elder <aelder@sgi.com> --- testcases/kernel/fs/doio/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/fs/doio/Makefile b/testcases/kernel/fs/doio/Makefile index 2cfc8b7..7e56089 100644 --- a/testcases/kernel/fs/doio/Makefile +++ b/testcases/kernel/fs/doio/Makefile @@ -24,7 +24,7 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk -CFLAGS += -D_LARGEFILE64_SOURCE +CFLAGS += -D_LARGEFILE64_SOURCE -Wall LDLIBS += -lrt -lpthread INSTALL_TARGETS := rwtest -- 1.7.4 ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH 0/6] ltp: kill off some compile warnings @ 2011-04-01 22:01 Alex Elder 2011-04-01 22:01 ` [LTP] [PATCH 1/6] ltp: fix databinchk() definition Alex Elder 0 siblings, 1 reply; 2+ messages in thread From: Alex Elder @ 2011-04-01 22:01 UTC (permalink / raw) To: ltp-list The motivation for this series of patches is to eliminate build warnings in files under "testcases/kernel/fs/doio/". The main reason warnings are emitted is that most functions are defined using old-style C syntax. So most of the changes amount to updating such functions to use standard C prototypes. The first patch fixes a buggy header file. The next one gathers type definitions to the top of "doio.c" so they are defined when needed in declaring all the function prototypes. The last patch enables the "-Wall" flag to gcc for these files. -Alex ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 2+ messages in thread
* [LTP] [PATCH 1/6] ltp: fix databinchk() definition 2011-04-01 22:01 [LTP] [PATCH 0/6] ltp: kill off some compile warnings Alex Elder @ 2011-04-01 22:01 ` Alex Elder 2011-04-01 22:01 ` [LTP] [PATCH 6/6] ltp: enable -Wall for doio compiles Alex Elder 0 siblings, 1 reply; 2+ messages in thread From: Alex Elder @ 2011-04-01 22:01 UTC (permalink / raw) To: ltp-list Fix a bogus (misspelled) declaration for databinchk() in "include/databin.h". Then, change databinchk() so that its second argument is a signed rather than an unsigned character pointer. This is consistent with the way it is used throughout the code. Because of the way that argument is used, it won't change the behavior of that function; its value is immediately assigned to a local variable, which is still unsigned. Add a cast in that assignment to force the conversion. Signed-off-by: Alex Elder <aelder@sgi.com> --- include/databin.h | 2 +- lib/databin.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/databin.h b/include/databin.h index c168799..93c3863 100644 --- a/include/databin.h +++ b/include/databin.h @@ -39,6 +39,6 @@ void databingen( int mode, char *buffer, int bsize, int offset ); -void databinchedk( int mode, unsigned char *buffer, int bsize, int offset, char **errmsg); +int databinchk( int mode, char *buffer, int bsize, int offset, char **errmsg); #endif diff --git a/lib/databin.c b/lib/databin.c index 6659ccf..c0f4307 100644 --- a/lib/databin.c +++ b/lib/databin.c @@ -91,7 +91,7 @@ int ind; int databinchk(mode, buffer, bsize, offset, errmsg) int mode; /* either a, c, r, z, o, or C */ -unsigned char *buffer; /* buffer pointer */ +char *buffer; /* buffer pointer */ int bsize; /* size of buffer */ int offset; /* offset into the file where buffer starts */ char **errmsg; @@ -102,7 +102,7 @@ char **errmsg; long expbits; long actbits; - chr=buffer; + chr = (unsigned char *) buffer; total=bsize; if (errmsg != NULL) { -- 1.7.4 ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH 6/6] ltp: enable -Wall for doio compiles 2011-04-01 22:01 ` [LTP] [PATCH 1/6] ltp: fix databinchk() definition Alex Elder @ 2011-04-01 22:01 ` Alex Elder 0 siblings, 0 replies; 2+ messages in thread From: Alex Elder @ 2011-04-01 22:01 UTC (permalink / raw) To: ltp-list Now that the code has been made modern and a few minor problems have been addressed, enable the "-Wall" flag for gcc when building files under "testcases/kernel/fs/doio/". Signed-off-by: Alex Elder <aelder@sgi.com> --- testcases/kernel/fs/doio/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/fs/doio/Makefile b/testcases/kernel/fs/doio/Makefile index 2cfc8b7..7e56089 100644 --- a/testcases/kernel/fs/doio/Makefile +++ b/testcases/kernel/fs/doio/Makefile @@ -24,7 +24,7 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk -CFLAGS += -D_LARGEFILE64_SOURCE +CFLAGS += -D_LARGEFILE64_SOURCE -Wall LDLIBS += -lrt -lpthread INSTALL_TARGETS := rwtest -- 1.7.4 ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-04 12:12 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-04-04 12:08 [LTP] [PATCH 6/6] ltp: enable -Wall for doio compiles Alex Elder -- strict thread matches above, loose matches on Subject: below -- 2011-04-01 22:01 [LTP] [PATCH 0/6] ltp: kill off some compile warnings Alex Elder 2011-04-01 22:01 ` [LTP] [PATCH 1/6] ltp: fix databinchk() definition Alex Elder 2011-04-01 22:01 ` [LTP] [PATCH 6/6] ltp: enable -Wall for doio compiles Alex Elder
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox