Remove warnings on various platforms
Subsystems (2)
PATCH 1/1 Remove warnings on various platforms
--- basic/subr.c | 5 ++++- basic/test1.c | 1 + basic/test2.c | 1 + basic/test3.c | 1 + basic/test4.c | 1 + basic/test4a.c | 1 + basic/test5.c | 1 + basic/test5a.c | 1 + basic/test5b.c | 1 + basic/test6.c | 1 + basic/test7.c | 1 + basic/test7a.c | 1 + basic/test7b.c | 1 + basic/test8.c | 1 + basic/test9.c | 1 + domount.c | 3 +++ general/large.c | 1 + general/stat.c | 1 + getopt.c | 3 +++ special/dupreq.c | 1 + special/negseek.c | 1 + special/nfsidem.c | 1 + special/nstat.c | 1 + special/rename.c | 1 + special/rewind.c | 6 +++++- special/stat.c | 1 + special/touchn.c | 6 ++++-- special/truncate.c | 6 +++++- tools/dirdmp.c | 1 + tools/dirprt.c | 1 + tools/pmapbrd.c | 15 ++++++++------- tools/tcpd.c | 2 +- tools/udp.c | 2 +- tools/udpd.c | 2 +- 34 files changed, 59 insertions(+), 15 deletions(-)
basic/subr.c +4 -1
@@ -19,17 +19,20 @@#endif #include <sys/types.h> -#include <sys/timeb.h> #ifdef DOSorWIN32 +#include <sys/timeb.h> #include <time.h> #else #include <sys/time.h> #endif +#include <sys/stat.h> +#include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#ifdef STDARG #include <stdarg.h> #endif
basic/test1.c +1 -0
@@ -50,6 +50,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test2.c +1 -0
@@ -48,6 +48,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test3.c +1 -0
@@ -48,6 +48,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test4.c +1 -0
@@ -52,6 +52,7 @@ usage() " n Suppress test directory create operations\n"); } +int main(argc, argv) int argc; char *argv[];
basic/test4a.c +1 -0
@@ -52,6 +52,7 @@ usage() " n Suppress test directory create operations\n"); } +int main(argc, argv) int argc; char *argv[];
basic/test5.c +1 -0
@@ -80,6 +80,7 @@ usage()#endif } +int main(argc, argv) int argc; char *argv[];
basic/test5a.c +1 -0
@@ -79,6 +79,7 @@ usage()#endif } +int main(argc, argv) int argc; char *argv[];
basic/test5b.c +1 -0
@@ -60,6 +60,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test6.c +1 -0
@@ -65,6 +65,7 @@ usage()fprintf (stdout," i Ignore non-test files dir entries\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test7.c +1 -0
@@ -53,6 +53,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test7a.c +1 -0
@@ -51,6 +51,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test7b.c +1 -0
@@ -53,6 +53,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test8.c +1 -0
@@ -55,6 +55,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test9.c +1 -0
@@ -65,6 +65,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
domount.c +3 -0
@@ -8,7 +8,10 @@*/ #include <stdio.h> +#include <stdlib.h> +#include <strings.h> +int main(argc, argv) int argc; char **argv;
general/large.c +1 -0
@@ -49,6 +49,7 @@ int nc, nl, np, nxo, na;#define cunlink (s) if (s) unlink(s) +int main (argc, argv)char **argv; {
general/stat.c +1 -0
@@ -24,6 +24,7 @@ char *Prog, *File;int getattfmt ();void prtstat (); +int main(argc, argv) int argc; char *argv[];
getopt.c +3 -0
@@ -36,6 +36,7 @@ (void )write (2 , errbuf,2 );}#include <string.h> +#include <stdlib.h> int opterr =1 ;int optind =1 ;
@@ -94,7 +95,9 @@ char **argv, *opts;#include <stdio.h> +int main (ac, av) +int ac;char **av; { registerint i;
special/dupreq.c +1 -0
@@ -17,6 +17,7 @@#include <fcntl.h> #endif +int main(argc, argv) int argc; char *argv[];
special/negseek.c +1 -0
@@ -21,6 +21,7 @@#endif #endif /* DOSorWIN32 */ +int main(argc, argv) int argc; char *argv[];
special/nfsidem.c +1 -0
@@ -53,6 +53,7 @@ static char TBAR[MAXPATHLEN];static char LBAR [MAXPATHLEN ];static char str[STRCHARS ]; +int main(ac,av) int ac; char *av[];
special/nstat.c +1 -0
@@ -26,6 +26,7 @@static int stats =0 ; +int main(argc, argv) int argc; char *argv[];
special/rename.c +1 -0
@@ -21,6 +21,7 @@#endif #endif /* DOSorWIN32 */ +int main(argc, argv) int argc; char *argv[];
special/rewind.c +5 -1
@@ -14,7 +14,11 @@#include <unistd.h> #endif /* DOSorWIN32 */ -main() +/*ARGSUSED*/ +int +main (argc, argv) +int argc; +char *argv[]; {char buffer[8192 ];int size =8192 ;
special/stat.c +1 -0
@@ -34,6 +34,7 @@ static int stats = 0; static void statit ARGS_((char *)); +int main(argc, argv) int argc; char *argv[];
special/touchn.c +4 -2
@@ -18,8 +18,10 @@#include "../tests.h" -main (argc,argv) -char **argv; +int +main (argc, argv) +int argc; +char **argv; {int n;char buf[1024 ];
special/truncate.c +5 -1
@@ -18,7 +18,11 @@#include <unistd.h> #endif /* DOSorWIN32 */ -main() +/*ARGSUSED*/ +int +main (argc, argv) +int argc; +char *argv[]; {int fd;struct stat statb;
tools/dirdmp.c +1 -0
@@ -31,6 +31,7 @@ static DIR * my_opendir ARGS_((char *name)); static void print ARGS_((char *)); static struct dirent *my_readdir ARGS_((DIR *dirp)); +int main(argc, argv) int argc; char *argv[];
tools/dirprt.c +1 -0
@@ -34,6 +34,7 @@ static DIR *my_opendir ARGS_((char *)); static void print ARGS_((char *)); +int main(argc, argv) int argc; char *argv[];
tools/pmapbrd.c +8 -7
@@ -174,8 +174,9 @@ main(argc, argv)* XXX shouldn't have to cast eachresult? */ clnt_stat = -clnt_broadcast_time (sock,RPROG ,RVERS ,RPROC_NUM , xdr_void, &a, - xdr_void, &b, (resultproc_t )eachresult, &t); +clnt_broadcast_time (sock,RPROG ,RVERS ,RPROC_NUM , + (xdrproc_t )xdr_void, &a, (xdrproc_t )xdr_void, &b, + (resultproc_t )eachresult, &t);if (clnt_stat !=RPC_TIMEDOUT ) {printf ("error: clnt_stat = %d\n" , clnt_stat);clnt_perrno (clnt_stat);
@@ -243,9 +244,9 @@ xdr_rmtcallres(xdrs, crp) {#ifdef SVR3 -if (xdr_reference (xdrs, (caddr_t *)&crp->port_ptr,sizeof (ulong), xdr_u_long) && +if (xdr_reference (xdrs, (caddr_t *)&crp->port_ptr,sizeof (ulong), (xdrproc_t )xdr_u_long) && #else - if (xdr_reference(xdrs, (caddr_t *)&crp->port_ptr, sizeof (u_long), xdr_u_long) && + if (xdr_reference(xdrs, (caddr_t *)&crp->port_ptr, sizeof (u_long), (xdrproc_t)xdr_u_long) && #endif xdr_u_long(xdrs, &crp->resultslen)) return ((*(crp->xdr_results))(xdrs, crp->results_ptr));
@@ -387,7 +388,7 @@ clnt_broadcast_time(sock, prog, vers, proc, xargs, argsp, xresults, recv_again: msg.acpted_rply.ar_verf = _null_auth; msg.acpted_rply.ar_results.where = (caddr_t)&r; - msg.acpted_rply.ar_results.proc = xdr_rmtcallres; + msg.acpted_rply.ar_results.proc = (xdrproc_t )xdr_rmtcallres; readfds = mask;switch (select (32 , (fd_set *)&readfds, (fd_set *)NULL , (fd_set *)NULL , t)) {
@@ -409,7 +410,7 @@ recv_again: try_again: fromlen =sizeof (struct sockaddr ); inlen =recvfrom (sock, inbuf,MAX_BROADCAST_SIZE ,0 , - (struct sockaddr *)&raddr, &fromlen); + (struct sockaddr *)&raddr, (socklen_t *)&fromlen);if (inlen <0 ) {if (errno ==EINTR ) goto try_again;
@@ -447,7 +448,7 @@ try_again:/* otherwise, just random garbage */ } xdrs->x_op =XDR_FREE ; - msg.acpted_rply.ar_results.proc = xdr_void; + msg.acpted_rply.ar_results.proc = (xdrproc_t )xdr_void; (void )xdr_replymsg (xdrs, &msg); (void )(*xresults)(xdrs, resultsp);xdr_destroy (xdrs);
tools/tcpd.c +1 -1
@@ -55,7 +55,7 @@ main(argc, argv)while (1 ) {fprintf (stderr,"%s awaiting accept\n" , argv[0 ]); addrlen =sizeof (struct sockaddr_in ); -if ((ns =accept (s, (struct sockaddr *)&addr, &addrlen)) <0 ) +if ((ns =accept (s, (struct sockaddr *)&addr, (socklen_t *)&addrlen)) <0 )xxit ("accept" );#ifdef __STDC__ if (hp = gethostbyaddr((const char *)&addr.sin_addr,
tools/udp.c +1 -1
@@ -62,7 +62,7 @@ main(argc, argv) ret =sendto (s, buf, len,0 , (struct sockaddr *)&addr, addrlen);fprintf (stderr," sendto ret %d (len %d)\n" , ret, len); - ret =recvfrom (s, buf,BUFSIZ ,0 , (struct sockaddr *)&addr, &addrlen); + ret =recvfrom (s, buf,BUFSIZ ,0 , (struct sockaddr *)&addr, (socklen_t *)&addrlen);fprintf (stderr," recvfrom ret %d\n" , ret);if (ret != len || *buf != *msg +1 ||strcmp (buf+1 , msg+1 ))
tools/udpd.c +1 -1
@@ -52,7 +52,7 @@ main(argc, argv)fprintf (stderr,"%s awaiting request\n" , argv[0 ]); addrlen =sizeof (struct sockaddr_in ); ret =recvfrom (s, buf,BUFSIZ ,0 , (struct sockaddr *)&addr, - &addrlen); + (socklen_t *)&addrlen);if (ret <0 )xxit ("recvfrom" );#ifdef __STDC__
Signature · 1 line
1.7.5.4
Hi.
For some of these new casts, wouldn't be it better to simply declare the variable to be the correct type to start with instead of casting some other type? For example, the socklen_t variables?
It seems funny that all of those XDR routines need to be casted as well.
Thanx... ps
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tom Haynes
Sent: Tuesday, June 28, 2011 6:22 PM
To: Steve Dickson
Cc: [email protected]; Tom Haynes
Subject: [PATCH 1/1] Remove warnings on various platforms
--- basic/subr.c | 5 ++++- basic/test1.c | 1 + basic/test2.c | 1 + basic/test3.c | 1 + basic/test4.c | 1 + basic/test4a.c | 1 + basic/test5.c | 1 + basic/test5a.c | 1 + basic/test5b.c | 1 + basic/test6.c | 1 + basic/test7.c | 1 + basic/test7a.c | 1 + basic/test7b.c | 1 + basic/test8.c | 1 + basic/test9.c | 1 + domount.c | 3 +++ general/large.c | 1 + general/stat.c | 1 + getopt.c | 3 +++ special/dupreq.c | 1 + special/negseek.c | 1 + special/nfsidem.c | 1 + special/nstat.c | 1 + special/rename.c | 1 + special/rewind.c | 6 +++++- special/stat.c | 1 + special/touchn.c | 6 ++++-- special/truncate.c | 6 +++++- tools/dirdmp.c | 1 + tools/dirprt.c | 1 + tools/pmapbrd.c | 15 ++++++++------- tools/tcpd.c | 2 +- tools/udp.c | 2 +- tools/udpd.c | 2 +- 34 files changed, 59 insertions(+), 15 deletions(-)
basic/subr.c +4 -1
@@ -19,17 +19,20 @@#endif #include <sys/types.h> -#include <sys/timeb.h> #ifdef DOSorWIN32 +#include <sys/timeb.h> #include <time.h> #else #include <sys/time.h> #endif +#include <sys/stat.h> +#include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#ifdef STDARG #include <stdarg.h> #endif
basic/test1.c +1 -0
@@ -50,6 +50,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test2.c +1 -0
@@ -48,6 +48,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test3.c +1 -0
@@ -48,6 +48,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test4.c +1 -0
@@ -52,6 +52,7 @@ usage() " n Suppress test directory create operations\n"); } +int main(argc, argv) int argc; char *argv[];
basic/test4a.c +1 -0
@@ -52,6 +52,7 @@ usage() " n Suppress test directory create operations\n"); } +int main(argc, argv) int argc; char *argv[];
basic/test5.c +1 -0
@@ -80,6 +80,7 @@ usage()#endif } +int main(argc, argv) int argc; char *argv[];
basic/test5a.c +1 -0
@@ -79,6 +79,7 @@ usage()#endif } +int main(argc, argv) int argc; char *argv[];
basic/test5b.c +1 -0
@@ -60,6 +60,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test6.c +1 -0
@@ -65,6 +65,7 @@ usage()fprintf (stdout," i Ignore non-test files dir entries\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test7.c +1 -0
@@ -53,6 +53,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test7a.c +1 -0
@@ -51,6 +51,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test7b.c +1 -0
@@ -53,6 +53,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test8.c +1 -0
@@ -55,6 +55,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
basic/test9.c +1 -0
@@ -65,6 +65,7 @@ usage()fprintf (stdout," n Suppress test directory create operations\n" ); } +int main(argc, argv) int argc; char *argv[];
domount.c +3 -0
@@ -8,7 +8,10 @@*/ #include <stdio.h> +#include <stdlib.h> +#include <strings.h> +int main(argc, argv) int argc; char **argv;
general/large.c +1 -0
@@ -49,6 +49,7 @@ int nc, nl, np, nxo, na;#define cunlink (s) if (s) unlink(s) +int main (argc, argv)char **argv; {
general/stat.c +1 -0
@@ -24,6 +24,7 @@ char *Prog, *File;int getattfmt ();void prtstat (); +int main(argc, argv) int argc; char *argv[];
getopt.c +3 -0
@@ -36,6 +36,7 @@ (void )write (2 , errbuf,2 );}#include <string.h> +#include <stdlib.h> int opterr =1 ;int optind =1 ;
@@ -94,7 +95,9 @@ char **argv, *opts;#include <stdio.h> +int main (ac, av) +int ac;char **av; { registerint i;
special/dupreq.c +1 -0
@@ -17,6 +17,7 @@#include <fcntl.h> #endif +int main(argc, argv) int argc; char *argv[];
special/negseek.c +1 -0
@@ -21,6 +21,7 @@#endif #endif /* DOSorWIN32 */ +int main(argc, argv) int argc; char *argv[];
special/nfsidem.c +1 -0
@@ -53,6 +53,7 @@ static char TBAR[MAXPATHLEN];static char LBAR [MAXPATHLEN ];static char str[STRCHARS ]; +int main(ac,av) int ac; char *av[];
special/nstat.c +1 -0
@@ -26,6 +26,7 @@static int stats =0 ; +int main(argc, argv) int argc; char *argv[];
special/rename.c +1 -0
@@ -21,6 +21,7 @@#endif #endif /* DOSorWIN32 */ +int main(argc, argv) int argc; char *argv[];
special/rewind.c +5 -1
@@ -14,7 +14,11 @@#include <unistd.h> #endif /* DOSorWIN32 */ -main() +/*ARGSUSED*/ +int +main (argc, argv) +int argc; +char *argv[]; {char buffer[8192 ];int size =8192 ;
special/stat.c +1 -0
@@ -34,6 +34,7 @@ static int stats = 0; static void statit ARGS_((char *)); +int main(argc, argv) int argc; char *argv[];
special/touchn.c +4 -2
@@ -18,8 +18,10 @@#include "../tests.h" -main (argc,argv) -char **argv; +int +main (argc, argv) +int argc; +char **argv; {int n;char buf[1024 ];
special/truncate.c +5 -1
@@ -18,7 +18,11 @@#include <unistd.h> #endif /* DOSorWIN32 */ -main() +/*ARGSUSED*/ +int +main (argc, argv) +int argc; +char *argv[]; {int fd;struct stat statb;
tools/dirdmp.c +1 -0
@@ -31,6 +31,7 @@ static DIR * my_opendir ARGS_((char *name)); static void print ARGS_((char *)); static struct dirent *my_readdir ARGS_((DIR *dirp)); +int main(argc, argv) int argc; char *argv[];
tools/dirprt.c +1 -0
@@ -34,6 +34,7 @@ static DIR *my_opendir ARGS_((char *)); static void print ARGS_((char *)); +int main(argc, argv) int argc; char *argv[];
tools/pmapbrd.c +8 -7
@@ -174,8 +174,9 @@ main(argc, argv)* XXX shouldn't have to cast eachresult? */ clnt_stat = -clnt_broadcast_time (sock,RPROG ,RVERS ,RPROC_NUM , xdr_void, &a, - xdr_void, &b, (resultproc_t )eachresult, &t); +clnt_broadcast_time (sock,RPROG ,RVERS ,RPROC_NUM , + (xdrproc_t )xdr_void, &a, (xdrproc_t )xdr_void, &b, + (resultproc_t )eachresult, &t);if (clnt_stat !=RPC_TIMEDOUT ) {printf ("error: clnt_stat = %d\n" , clnt_stat);clnt_perrno (clnt_stat);
@@ -243,9 +244,9 @@ xdr_rmtcallres(xdrs, crp) {#ifdef SVR3 -if (xdr_reference (xdrs, (caddr_t *)&crp->port_ptr,sizeof (ulong), xdr_u_long) && +if (xdr_reference (xdrs, (caddr_t *)&crp->port_ptr,sizeof (ulong), (xdrproc_t )xdr_u_long) && #else - if (xdr_reference(xdrs, (caddr_t *)&crp->port_ptr, sizeof (u_long), xdr_u_long) && + if (xdr_reference(xdrs, (caddr_t *)&crp->port_ptr, sizeof (u_long), (xdrproc_t)xdr_u_long) && #endif xdr_u_long(xdrs, &crp->resultslen)) return ((*(crp->xdr_results))(xdrs, crp->results_ptr));
@@ -387,7 +388,7 @@ clnt_broadcast_time(sock, prog, vers, proc, xargs, argsp, xresults, recv_again: msg.acpted_rply.ar_verf = _null_auth; msg.acpted_rply.ar_results.where = (caddr_t)&r; - msg.acpted_rply.ar_results.proc = xdr_rmtcallres; + msg.acpted_rply.ar_results.proc = (xdrproc_t )xdr_rmtcallres; readfds = mask;switch (select (32 , (fd_set *)&readfds, (fd_set *)NULL , (fd_set *)NULL , t)) {
@@ -409,7 +410,7 @@ recv_again: try_again: fromlen =sizeof (struct sockaddr ); inlen =recvfrom (sock, inbuf,MAX_BROADCAST_SIZE ,0 , - (struct sockaddr *)&raddr, &fromlen); + (struct sockaddr *)&raddr, (socklen_t *)&fromlen);if (inlen <0 ) {if (errno ==EINTR ) goto try_again;
@@ -447,7 +448,7 @@ try_again:/* otherwise, just random garbage */ } xdrs->x_op =XDR_FREE ; - msg.acpted_rply.ar_results.proc = xdr_void; + msg.acpted_rply.ar_results.proc = (xdrproc_t )xdr_void; (void )xdr_replymsg (xdrs, &msg); (void )(*xresults)(xdrs, resultsp);xdr_destroy (xdrs);
tools/tcpd.c +1 -1
@@ -55,7 +55,7 @@ main(argc, argv)while (1 ) {fprintf (stderr,"%s awaiting accept\n" , argv[0 ]); addrlen =sizeof (struct sockaddr_in ); -if ((ns =accept (s, (struct sockaddr *)&addr, &addrlen)) <0 ) +if ((ns =accept (s, (struct sockaddr *)&addr, (socklen_t *)&addrlen)) <0 )xxit ("accept" );#ifdef __STDC__ if (hp = gethostbyaddr((const char *)&addr.sin_addr,
tools/udp.c +1 -1
@@ -62,7 +62,7 @@ main(argc, argv) ret =sendto (s, buf, len,0 , (struct sockaddr *)&addr, addrlen);fprintf (stderr," sendto ret %d (len %d)\n" , ret, len); - ret =recvfrom (s, buf,BUFSIZ ,0 , (struct sockaddr *)&addr, &addrlen); + ret =recvfrom (s, buf,BUFSIZ ,0 , (struct sockaddr *)&addr, (socklen_t *)&addrlen);fprintf (stderr," recvfrom ret %d\n" , ret);if (ret != len || *buf != *msg +1 ||strcmp (buf+1 , msg+1 ))
tools/udpd.c +1 -1
@@ -52,7 +52,7 @@ main(argc, argv)fprintf (stderr,"%s awaiting request\n" , argv[0 ]); addrlen =sizeof (struct sockaddr_in ); ret =recvfrom (s, buf,BUFSIZ ,0 , (struct sockaddr *)&addr, - &addrlen); + (socklen_t *)&addrlen);if (ret <0 )xxit ("recvfrom" );#ifdef __STDC__
Signature · 6 lines
1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · On Wed, Jun 29, 2011 at 07:53:19AM -0400, [email protected] wrote:
Hi.
For some of these new casts, wouldn't be it better to simply declare the variable to be the correct type to start with instead of casting some other type? For example, the
socklen_tvariables?It seems funny that all of those XDR routines need to be casted as well.
Thanx... ps
I tried to go with the most innocent changes I could. My main concern is lack of access to different platforms to do sanity compiles and unit testing.
Signature · 2 lines
Tom Haynes ex-cfb
Hmmm. Yes, make sense.
That said, I think that it would be better to attempt to do it the right way and then let people tell us when it isn't quite right yet. We should eventually be able to come to a set of changes which are right, for everyone.
Compiling on Linux, Solaris, and FreeBSD should be a good start. Perhaps Olga or someone else could help with the Windows compiles. I suspect that we could find someone with access to AIX or HP/UX or ... :-)
Perhaps we could also consider cleaning up tests.init? The lists of commented out options seems quite unwieldly to me. Do we really need all of that stuff, especially for the much older systems?
Thanx... ps
-----Original Message-----
From: Tom Haynes [mailto:[email protected]]
Sent: Wednesday, June 29, 2011 1:29 PM
To: Staubach, Peter
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] Remove warnings on various platforms
Quoted 9 lines · On Wed, Jun 29, 2011 at 07:53:19AM -0400, [email protected] wrote:
Hi.
For some of these new casts, wouldn't be it better to simply declare the variable to be the correct type to start with instead of casting some other type? For example, the
socklen_tvariables?It seems funny that all of those XDR routines need to be casted as well.
Thanx... ps
I tried to go with the most innocent changes I could. My main concern is lack of access to different platforms to do sanity compiles and unit testing.
Signature · 2 lines
Tom Haynes ex-cfb
Quoted 3 lines · On Wed, Jun 29, 2011 at 02:16:24PM -0400, [email protected] wrote:
Hmmm. Yes, make sense.
That said, I think that it would be better to attempt to do it the right way and then let people tell us when it isn't quite right yet. We should eventually be able to come to a set of changes which are right, for everyone.
Okay, I'll do that and resubmit.
Quoted 4 lines
Compiling on Linux, Solaris, and FreeBSD should be a good start. Perhaps Olga or someone else could help with the Windows compiles. I suspect that we could find someone with access to AIX or HP/UX or ... :-)
Perhaps we could also consider cleaning up tests.init? The lists of commented out options seems quite unwieldly to me. Do we really need all of that stuff, especially for the much older systems?
Yeah, I've been wondering if modern tools like autoconfig would work here.
Quoted 32 lines
Thanx... ps-----Original Message-----
From: Tom Haynes [mailto:[email protected]]
Sent: Wednesday, June 29, 2011 1:29 PM
To: Staubach, Peter
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] Remove warnings on various platformsQuoted 9 lines · On Wed, Jun 29, 2011 at 07:53:19AM -0400, [email protected] wrote:
Hi.
For some of these new casts, wouldn't be it better to simply declare the variable to be the correct type to start with instead of casting some other type? For example, the
socklen_tvariables?It seems funny that all of those XDR routines need to be casted as well.
Thanx... psI tried to go with the most innocent changes I could. My main concern is lack of access to different platforms to do sanity compiles and unit testing.
Signature · 2 lines
Tom Haynes ex-cfb
Signature · 2 lines
Tom Haynes ex-cfb
Tom Haynes wrote:
Quoted 1 line · On Wed, Jun 29, 2011 at 02:16:24PM -0400, [email protected] wrote:
Perhaps we could also consider cleaning up tests.init? The lists of
commented out options seems quite unwieldly to me. Do we really need all of that stuff, especially for the much older systems?
Yeah, I've been wondering if modern tools like autoconfig would work here.
I don't know that we need full-blown autoconf, which has portability problems of its own. Maybe a shell script or makefile that figures out (or asks) what you're running on and tweaks tests.init for you.