]> arthur.barton.de Git - netatalk.git/commitdiff
Warning fixes.
authorsrittau <srittau>
Thu, 31 May 2001 18:39:00 +0000 (18:39 +0000)
committersrittau <srittau>
Thu, 31 May 2001 18:39:00 +0000 (18:39 +0000)
bin/pap/pap.c
bin/pap/papstatus.c
bin/psorder/pa.c
bin/psorder/psorder.c

index 076d08e1b58f6c476b7629145903d0590a134415..2d647ef1cf218acb6b0e05645619faf50e97c650 100644 (file)
 #define _PATH_PAPRC    ".paprc"
 char   *nbpfailure = "AppleTalk printer offline";
 
+/* Forward Declarations */
+void updatestatus(char *s, int len);
+int send_file(int fd, ATP atp, int lastfile);
+
 /* if there is a less hacky way to do this, please do it... */
 #ifdef DEBUG
 #define EBUG
@@ -40,7 +44,7 @@ char  *nbpfailure = "AppleTalk printer offline";
 #define DEBUG(x,y)
 #endif /*EBUG*/
 
-usage( path )
+void usage( path )
     char       *path;
 {
     char       *p;
@@ -138,7 +142,7 @@ struct iovec        sfiov[ PAP_MAXQUANTUM ] = {
     { nbuf[ 7 ] + 4,   0 },
 };
 
-main( ac, av )
+int main( ac, av )
     int                ac;
     char       **av;
 {
@@ -358,7 +362,7 @@ DEBUG( printf( "OPEN >\n" ), fflush( stdout ));
 DEBUG( printf( "< OPENREPLY\n" ), fflush( stdout ));
 
        if ( isatty( 1 )) {
-           printf( "%.*s\n", iov.iov_len - 9, (char *) iov.iov_base + 9 );
+           printf( "%.*s\n", (int)iov.iov_len - 9, (char *) iov.iov_base + 9 );
        }
        updatestatus( (char *) iov.iov_base + 9, iov.iov_len - 9 );
 
@@ -453,7 +457,7 @@ int         data = 0;
 unsigned char  port;
 u_int16_t       seq = 0, rseq = 1;
 
-send_file( fd, atp, lastfile )
+int send_file( fd, atp, lastfile )
     int                        fd;
     ATP                        atp;
     int                        lastfile;
@@ -830,7 +834,7 @@ DEBUG( printf( "< STATUS\n" ), fflush( stdout ));
     }
 }
 
-updatestatus( s, len )
+void updatestatus( s, len )
     char       *s;
     int                len;
 {
index 57c844fd7404b060b7866ac7d767307483e0826f..c232777cf98f211307c3d63e9e14936ce8f676a1 100644 (file)
 #include <atalk/nbp.h>
 #include <atalk/util.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 
 #define _PATH_PAPRC    ".paprc"
 
-usage( path )
+/* Forward Declaration */
+void getstatus(ATP atp, struct sockaddr_at *sat);
+
+void usage( path )
     char       *path;
 {
     char       *p;
@@ -83,7 +87,7 @@ char                  *printer = NULL;
 char                   cbuf[ 8 ];
 struct nbpnve          nn;
 
-main( ac, av )
+int main( ac, av )
     int                ac;
     char       **av;
 {
@@ -157,9 +161,11 @@ main( ac, av )
        getstatus( atp, &nn.nn_sat );
        sleep( wait );
     }
+
+    return 0;
 }
 
-getstatus( atp, sat )
+void getstatus( atp, sat )
     ATP                        atp;
     struct sockaddr_at *sat;
 {
@@ -197,5 +203,5 @@ getstatus( atp, sat )
        return; /* This is weird, since TIDs must match... */
     }
 
-    printf( "%.*s\n", iov.iov_len - 9, (char *) iov.iov_base + 9 );
+    printf( "%.*s\n", (int)iov.iov_len - 9, (char *) iov.iov_base + 9 );
 }
index 85a8508cc83dc7b60a6bbe808dbd6454d48f0821..f1a52e8f32d68528b824e7847400518ed86d1419 100644 (file)
@@ -28,6 +28,8 @@
 #endif
 
 #include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include "pa.h"
 
index 4f2e3a940f176a4c2a1ab222700df1751ce7342c..176e29122ccb7af1cfaa877eb86ec15b25184d89 100644 (file)
@@ -51,7 +51,7 @@ u_char                        psbuf[ 8192 ];
 struct psinfo_st       psinfo;
 int                    orderflag, forceflag;
 
-main( argc, argv )
+int main( argc, argv )
     int                argc;
     char       **argv;
 {
@@ -242,7 +242,7 @@ readps( inputfd, tempfd, tempfile )
 #endif
            pa_match( pb );
            ccmatch = ccread - 1;
-           while ( c = pa_getchar( pb )) {
+           while ( ( c = pa_getchar( pb ) ) ) {
                if ( c != 0 ) {
                    ccread++;
                    (void)putc( c, tempstream );