1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

initial_args warning

Provide for WIN32 and non-WIN32 condition for initial_args malloc (compiler warning)
and remove redundant static.
This commit is contained in:
sterlingpickens 2014-05-26 19:53:27 -07:00
parent c46c913d1c
commit 246615f238

View File

@ -3243,7 +3243,6 @@ void kill_work(void)
quit(0, "Shutdown signal received."); quit(0, "Shutdown signal received.");
} }
static
#ifdef WIN32 #ifdef WIN32
const const
#endif #endif
@ -7941,7 +7940,12 @@ int main(int argc, char *argv[])
quithere(1, "Failed to pthread_mutex_init lockstat_lock errno=%d", errno); quithere(1, "Failed to pthread_mutex_init lockstat_lock errno=%d", errno);
#endif #endif
#ifdef WIN32
initial_args = (const char **)malloc(sizeof(char *)* (argc + 1)); initial_args = (const char **)malloc(sizeof(char *)* (argc + 1));
#else
initial_args = (char **)malloc(sizeof(char *)* (argc + 1));
#endif
for (i = 0; i < argc; i++) for (i = 0; i < argc; i++)
initial_args[i] = strdup(argv[i]); initial_args[i] = strdup(argv[i]);
initial_args[argc] = NULL; initial_args[argc] = NULL;