]> diplodocus.org Git - nmh/blobdiff - uip/rcvstore.c
Use result, because (void) didn't prevent warning on FreeBSD 10.
[nmh] / uip / rcvstore.c
index 64b4a0072efd80d99e702c9bd94baa9a2dc154b9..25bb8780dd6eb66ae96f7ee0fc39ad6f27966bdc 100644 (file)
@@ -54,11 +54,11 @@ main (int argc, char **argv)
     struct msgs *mp;
     struct stat st;
 
     struct msgs *mp;
     struct stat st;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], 2)) { return 1; }
 
     done=unlink_done;
 
 
     done=unlink_done;
 
-    mts_init (invo_name);
+    mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
@@ -166,7 +166,7 @@ main (int argc, char **argv)
     cpydata (fileno (stdin), fd, "standard input", tmpfilenam);
 
     if (fstat (fd, &st) == NOTOK) {
     cpydata (fileno (stdin), fd, "standard input", tmpfilenam);
 
     if (fstat (fd, &st) == NOTOK) {
-       unlink (tmpfilenam);
+       (void) m_unlink (tmpfilenam);
        adios (tmpfilenam, "unable to fstat");
     }
     if (close (fd) == NOTOK)
        adios (tmpfilenam, "unable to fstat");
     }
     if (close (fd) == NOTOK)
@@ -174,7 +174,7 @@ main (int argc, char **argv)
 
     /* don't add file if it is empty */
     if (st.st_size == 0) {
 
     /* don't add file if it is empty */
     if (st.st_size == 0) {
-       unlink (tmpfilenam);
+       (void) m_unlink (tmpfilenam);
        advise (NULL, "empty file");
        done (0);
     }
        advise (NULL, "empty file");
        done (0);
     }
@@ -189,7 +189,7 @@ main (int argc, char **argv)
      * Link message into folder, and possibly add
      * to the Unseen-Sequence's.
      */
      * Link message into folder, and possibly add
      * to the Unseen-Sequence's.
      */
-    if ((msgnum = folder_addmsg (&mp, tmpfilenam, 0, unseensw, 0, 0, (char *)0)) == -1)
+    if ((msgnum = folder_addmsg (&mp, tmpfilenam, 0, unseensw, 0, 0, NULL)) == -1)
        done (1);
 
     /*
        done (1);
 
     /*
@@ -212,7 +212,7 @@ main (int argc, char **argv)
     folder_free (mp);          /* free folder/message structure          */
 
     context_save ();           /* save the global context file           */
     folder_free (mp);          /* free folder/message structure          */
 
     context_save ();           /* save the global context file           */
-    unlink (tmpfilenam);       /* remove temporary file                  */
+    (void) m_unlink (tmpfilenam); /* remove temporary file                  */
     tmpfilenam = NULL;
 
     done (0);
     tmpfilenam = NULL;
 
     done (0);
@@ -226,6 +226,6 @@ static void
 unlink_done(int status)
 {
     if (tmpfilenam && *tmpfilenam)
 unlink_done(int status)
 {
     if (tmpfilenam && *tmpfilenam)
-       unlink (tmpfilenam);
+       (void) m_unlink (tmpfilenam);
     exit (status);
 }
     exit (status);
 }