]> code.citadel.org Git - citadel.git/commitdiff
* Cleaned up some compiler warnings
authorArt Cancro <ajc@citadel.org>
Wed, 14 Oct 2009 21:48:17 +0000 (21:48 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 14 Oct 2009 21:48:17 +0000 (21:48 +0000)
citadel/getmail.c
citadel/routines2.c

index 372c3f10d43dbf9c297a53130fc174fc533dd56e..0138b01f4fd9f2e7f5e282ce3c33ce9eebfde4d1 100644 (file)
@@ -3,9 +3,23 @@
  *
  * Command-line utility to transmit a server command.
  *
+ * Copyright (c) 1987-2009 by the citadel.org team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -46,9 +60,10 @@ int set_lockfile(void)
 {
        FILE *lfp;
        int onppid;
+       int rv;
 
        if ((lfp = fopen(LOCKFILE, "r")) != NULL) {
-               fscanf(lfp, "%d", &onppid);
+               rv = fscanf(lfp, "%d", &onppid);
                fclose(lfp);
                if (!kill(onppid, 0) || errno == EPERM)
                        return 1;
@@ -372,8 +387,8 @@ int main(int argc, char **argv)
                                n = read(ipc->sock, rbuf, SIZ);
                                if (n>0) {
                                        rbuf[n]='\0';
-                                       fprintf (stderr, rbuf);
-                                       fflush (stdout);
+                                       fprintf(stderr, "%s", rbuf);
+                                       fflush(stdout);
                                }
                        }
                        alarm(5); /* Kick the watchdog timer */
index ab8ec1c21a0a88e95981760e7f574126edb340ba..3fbff5f3d136d85b242d81f9fef7c5eec820564f 100644 (file)
@@ -316,6 +316,7 @@ void upload(CtdlIPC *ipc, int c)
        int a, b;
        FILE *fp, *lsfp;
        int r;
+       int rv;
 
        if ((room_flags & QR_UPLOAD) == 0) {
                scr_printf("*** You cannot upload to this room.\n");
@@ -342,7 +343,7 @@ void upload(CtdlIPC *ipc, int c)
        /* now do the transfer ... in a separate process */
        xfer_pid = fork();
        if (xfer_pid == 0) {
-               chdir(tempdir);
+               rv = chdir(tempdir);
                switch (c) {
                case 0:
                        stty_ctdl(0);