]> git.notmuchmail.org Git - notmuch/commitdiff
Fix compilation warnings in test/smtp-dummy.c.
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Thu, 16 Jun 2011 10:32:08 +0000 (14:32 +0400)
committerCarl Worth <cworth@cworth.org>
Wed, 22 Jun 2011 13:38:33 +0000 (06:38 -0700)
* Remove unused variables in main(): buf, bytes and greeting.
* Replace return with no value in main() with exit(3).

test/smtp-dummy.c

index e58d0ad68d7b606650b4e04c19a1c64bc6d57286..133d6c4eea3bfc43df4780d8d777e2dbbd2fdbbd 100644 (file)
@@ -99,9 +99,6 @@ process_command (FILE *peer, FILE *output, const char *command)
 static void
 do_smtp_to_file (FILE *peer, FILE *output)
 {
 static void
 do_smtp_to_file (FILE *peer, FILE *output)
 {
-       char buf[4096];
-       ssize_t bytes;
-       char greeting[] = "220 localhost smtp-dummy\r\n";
        char *line = NULL;
        size_t line_size;
        ssize_t line_len;
        char *line = NULL;
        size_t line_size;
        ssize_t line_len;
@@ -193,7 +190,7 @@ main (int argc, char *argv[])
        if (peer_file == NULL) {
                fprintf (stderr, "Error: fdopen() failed: %s\n",
                         strerror (errno));
        if (peer_file == NULL) {
                fprintf (stderr, "Error: fdopen() failed: %s\n",
                         strerror (errno));
-               return;
+               exit (1);
        }
 
        do_smtp_to_file (peer_file, output);
        }
 
        do_smtp_to_file (peer_file, output);