Address Windows warnings in apps/.
authorAndy Polyakov <appro@openssl.org>
Wed, 30 Sep 2015 08:27:19 +0000 (10:27 +0200)
committerAndy Polyakov <appro@openssl.org>
Mon, 5 Oct 2015 07:25:06 +0000 (09:25 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
apps/opt.c
apps/s_time.c

index c7dcc434e8b2d707c7f2dca2480676c2efe8c172..90a9d84e47c141db7b9f6465ad5fef87f2bf4053 100644 (file)
@@ -80,8 +80,7 @@ static char prog[40];
 #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_NETWARE)
 char *opt_progname(const char *argv0)
 {
-    int i;
-    int n;
+    size_t i, n;
     const char *p;
     char *q;
 
index 91d28c209ca8c7d165dd053d229450ee52213001..6514fb21972dba446909b9dd19be0131384b980d 100644 (file)
 #include <openssl/pem.h>
 #include "s_apps.h"
 #include <openssl/err.h>
-#ifdef WIN32_STUFF
-# include "winmain.h"
-# include "wintext.h"
-#endif
 #if !defined(OPENSSL_SYS_MSDOS)
 # include OPENSSL_UNISTD
 #endif
@@ -166,9 +162,6 @@ int s_time_main(int argc, char **argv)
         0, ver;
     long bytes_read = 0, finishtime = 0;
     OPTION_CHOICE o;
-#ifdef OPENSSL_SYS_WIN32
-    int exitNow = 0;            /* Set when it's time to exit main */
-#endif
 
     meth = TLS_client_method();
     verify_depth = 0;
@@ -281,14 +274,6 @@ int s_time_main(int argc, char **argv)
     for (;;) {
         if (finishtime < (long)time(NULL))
             break;
-#ifdef WIN32_STUFF
-
-        if (flushWinMsgs(0) == -1)
-            goto end;
-
-        if (waitingToDie || exitNow) /* we're dead */
-            goto end;
-#endif
 
         if ((scon = doConnection(NULL, host, ctx)) == NULL)
             goto end;
@@ -378,14 +363,6 @@ int s_time_main(int argc, char **argv)
         if (finishtime < (long)time(NULL))
             break;
 
-#ifdef WIN32_STUFF
-        if (flushWinMsgs(0) == -1)
-            goto end;
-
-        if (waitingToDie || exitNow) /* we're dead */
-            goto end;
-#endif
-
         if ((doConnection(scon, host, ctx)) == NULL)
             goto end;