Hi Cai,

On Sun, 2009-01-25 at 00:29 -0800, CAI Qian wrote:
> Hi,
> 
> This patch fixes compilation warnings introduced recently.
> 
> libtestsuite.c: In function ‘sync_pipe_create’:
> libtestsuite.c:98: warning: passing argument 1 of ‘generate_pipe_name’ 
> discards qualifiers from pointer target type
> libtestsuite.c: In function ‘sync_pipe_close’:
> libtestsuite.c:126: warning: passing argument 1 of ‘generate_pipe_name’ 
> discards qualifiers from pointer target type
> system_specific_process_info.o system_specific_process_info.c
> system_specific_process_info.c: In function ‘get_free_pids’:
> system_specific_process_info.c:66: warning: unused variable ‘buf’HTutils.c: 
> In function ‘is_cmdline_para’:
> HTutils.c:24: warning: unused variable ‘i’
> HTutils.c: In function ‘is_ht_kernel’:
> HTutils.c:45: warning: unused variable ‘i’
> msgctl11.c: In function ‘setup’:
> msgctl11.c:662: warning: implicit declaration of function ‘get_free_pids’
> paccept01.c:114:1: warning: "SOCK_CLOEXEC" redefined
> In file included from /usr/include/sys/socket.h:40,
>                  from /usr/include/netinet/in.h:25,
>                  from paccept01.c:80:
> /usr/include/bits/socket.h:67:1: warning: this is the location of the 
> previous definition
> paccept02.c:83:1: warning: "SOCK_NONBLOCK" redefined
> In file included from /usr/include/sys/socket.h:40,
>                  from /usr/include/netinet/in.h:25,
>                  from paccept02.c:52:
> /usr/include/bits/socket.h:70:1: warning: this is the location of the 
> previous definition
> socket02.c:77:1: warning: "SOCK_CLOEXEC" redefined
> In file included from /usr/include/sys/socket.h:40,
>                  from /usr/include/netinet/in.h:25,
>                  from socket02.c:63:
> /usr/include/bits/socket.h:67:1: warning: this is the location of the 
> previous definition
> socket03.c:60:1: warning: "SOCK_NONBLOCK" redefined
> In file included from /usr/include/sys/socket.h:40,
>                  from /usr/include/netinet/in.h:25,
>                  from socket03.c:52:
> /usr/include/bits/socket.h:70:1: warning: this is the location of the 
> previous definition
> socketpair02.c:60:1: warning: "SOCK_NONBLOCK" redefined
> In file included from /usr/include/sys/socket.h:40,
>                  from /usr/include/netinet/in.h:25,
>                  from socketpair02.c:52:
> /usr/include/bits/socket.h:70:1: warning: this is the location of the 
> previous definition
> 
> Signed-off-by: CAI Qian <[email protected]>

It did address those warnings, which i see go away after application of
this patch. However i did not find any warnings for the following:

cc -I../../../../include -Wall    socket01.c  -L../../../../lib -lltp
-lpthread -o socket01
cc -I../../../../include -Wall    socket02.c  -L../../../../lib -lltp
-lpthread -o socket02
cc -I../../../../include -Wall    socket03.c  -L../../../../lib -lltp
-lpthread -o socket03
cc -I../../../../include -Wall    socketpair01.c  -L../../../../lib
-lltp -lpthread -o socketpair01
cc -I../../../../include -Wall    socketpair02.c  -L../../../../lib
-lltp -lpthread -o socketpair02
cc -I../../../../include -Wall    paccept01.c  -L../../../../lib -lltp
-lpthread -o paccept01
cc -I../../../../include -Wall    paccept02.c  -L../../../../lib -lltp
-lpthread -o paccept02

But, neither the patch introduced any harm to them. Good to see it
addressed warnings on your system. Thanks.

Regards--
Subrata

> 
> --- lib/system_specific_process_info.c.orig   2009-01-25 14:16:19.884788155 
> +0800
> +++ lib/system_specific_process_info.c        2009-01-25 14:41:42.542791740 
> +0800
> @@ -63,7 +63,6 @@
>  {
>       FILE *f;
>       int used_pids, max_pids;
> -     char buf[BUFSIZE];
>  
>       f = popen("ps -eT | wc -l", "r");
>       if (!f) {
> 
> --- lib/libtestsuite.c.orig   2009-01-25 14:16:09.936795314 +0800
> +++ lib/libtestsuite.c        2009-01-25 14:41:02.266789235 +0800
> @@ -78,13 +78,13 @@
>  
>  static char pipe_name[256];
>  
> -void generate_pipe_name(char *name)
> +void generate_pipe_name(const char *name)
>  {
>       char *p;
>  
>       p = rindex(name, '/');
>       if (p == NULL)
> -             p = name;
> +             p = (char *) name;
>       else
>               p++;
>       snprintf(pipe_name, 255, "%s/ltp_fifo_%s", P_tmpdir, p);
> 
> --- testcases/kernel/sched/hyperthreading/ht_interrupt/HTutils.c.orig 
> 2009-01-25 15:26:29.907789349 +0800
> +++ testcases/kernel/sched/hyperthreading/ht_interrupt/HTutils.c      
> 2009-01-25 15:27:05.175803096 +0800
> @@ -21,7 +21,6 @@
>  int is_cmdline_para(const char *para)
>  {
>       FILE *fp;
> -     int i;
>  
>       if((fp=fopen("/proc/cmdline","r"))!=NULL && para!=NULL)
>       {
> @@ -42,7 +41,6 @@
>  int is_ht_kernel()
>  {
>       FILE *fp;
> -     int i;
>  
>       if((fp=fopen("/proc/cpuinfo","r"))!=NULL)
>       {
> 
> --- testcases/kernel/syscalls/socket/socket02.c.orig  2009-01-25 
> 16:10:56.331788048 +0800
> +++ testcases/kernel/syscalls/socket/socket02.c       2009-01-25 
> 16:12:42.100789350 +0800
> @@ -74,7 +74,9 @@
>  #endif
>  
>  /* For Linux these must be the same.  */
> -#define SOCK_CLOEXEC O_CLOEXEC
> +#ifndef SOCK_CLOEXEC
> +# define SOCK_CLOEXEC O_CLOEXEC
> +#endif
>  
>  /* Extern Global Variables */
>  extern int  Tst_count;               /* counter for tst_xxx routines.        
>  */
> 
> --- testcases/kernel/syscalls/socket/socket03.c.orig  2009-01-25 
> 16:11:50.100788512 +0800
> +++ testcases/kernel/syscalls/socket/socket03.c       2009-01-25 
> 16:12:50.098788816 +0800
> @@ -57,7 +57,9 @@
>  #include "test.h"
>  #include "usctest.h"
>  
> -#define SOCK_NONBLOCK O_NONBLOCK
> +#ifndef SOCK_NONBLOCK
> +# define SOCK_NONBLOCK O_NONBLOCK
> +#endif
>  
>  /* Extern Global Variables */
>  extern int  Tst_count;               /* counter for tst_xxx routines.        
>  */
> 
> --- testcases/kernel/syscalls/socketpair/socketpair02.c.orig  2009-01-25 
> 16:13:11.552787706 +0800
> +++ testcases/kernel/syscalls/socketpair/socketpair02.c       2009-01-25 
> 16:13:40.203787666 +0800
> @@ -57,7 +57,9 @@
>  #include "test.h"
>  #include "usctest.h"
>  
> -#define SOCK_NONBLOCK O_NONBLOCK
> +#ifndef SOCK_NONBLOCK
> +# define SOCK_NONBLOCK O_NONBLOCK
> +#endif
>  
>  /* Extern Global Variables */
>  extern int  Tst_count;               /* counter for tst_xxx routines.        
>  */
> 
> --- testcases/kernel/syscalls/paccept/paccept02.c.orig        2009-01-25 
> 16:08:36.432788343 +0800
> +++ testcases/kernel/syscalls/paccept/paccept02.c     2009-01-25 
> 16:09:12.899787213 +0800
> @@ -80,7 +80,9 @@
>  
>  #define PORT 57392
>  
> +#ifndef SOCK_NONBLOCK
>  #define SOCK_NONBLOCK O_NONBLOCK
> +#endif
>  
>  static pthread_barrier_t b;
>  
> --- testcases/kernel/syscalls/paccept/paccept01.c.orig        2009-01-25 
> 15:38:26.995792178 +0800
> +++ testcases/kernel/syscalls/paccept/paccept01.c     2009-01-25 
> 16:09:24.044787804 +0800
> @@ -111,7 +111,10 @@
>  #endif
>  
>  #define PORT 57392
> +
> +#ifndef SOCK_CLOEXEC
>  #define SOCK_CLOEXEC O_CLOEXEC
> +#endif
>  
>  static pthread_barrier_t b;
>  
> --- testcases/kernel/syscalls/ipc/msgctl/msgctl11.c.orig      2009-01-25 
> 15:27:42.454790587 +0800
> +++ testcases/kernel/syscalls/ipc/msgctl/msgctl11.c   2009-01-25 
> 15:37:39.106788997 +0800
> @@ -51,6 +51,7 @@
>  #include "test.h"
>  #include "usctest.h"
>  #include "ipcmsg.h"
> +#include "system_specific_process_info.h"
>  
>  #define MAXNREPS     1000
>  #ifndef CONFIG_COLDFIRE
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to