Merge pull request #207 from cosmo-ray/fix-linux-gcc8.2-warnings
Fix gcc8.2 warnings on linux
This commit is contained in:
commit
d80a84b762
|
@ -238,12 +238,13 @@ void * ZIPROMReaderInit(const char * filename)
|
|||
ZZIP_DIRENT * dirent = zzip_readdir(dir);
|
||||
if (dir != NULL)
|
||||
{
|
||||
char tmp1[1024];
|
||||
char *tmp1;
|
||||
char tmp2[1024];
|
||||
memset(tmp1,0,sizeof(tmp1));
|
||||
|
||||
memset(tmp2,0,sizeof(tmp2));
|
||||
strncpy(tmp1, filename, strlen(filename) - 4);
|
||||
tmp1 = strndup(filename, strlen(filename) - 4);
|
||||
sprintf(tmp2, "%s/%s", tmp1, dirent->d_name);
|
||||
free(tmp1);
|
||||
return zzip_fopen(tmp2, "rb");
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -574,9 +574,9 @@ int main(int argc, char ** argv) {
|
|||
slot2_Init();
|
||||
slot2_Change((NDS_SLOT2_TYPE)slot2_device_type);
|
||||
|
||||
if ( !g_thread_supported()) {
|
||||
#if !g_thread_supported()
|
||||
g_thread_init( NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
driver = new BaseDriver();
|
||||
|
||||
|
|
|
@ -539,8 +539,9 @@ int main(int argc, char *argv[]) {
|
|||
fprintf(stderr, "Warning: X11 not thread-safe\n");
|
||||
}
|
||||
|
||||
if (!g_thread_supported())
|
||||
g_thread_init( NULL);
|
||||
#if !g_thread_supported()
|
||||
g_thread_init( NULL);
|
||||
#endif
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
|
|
|
@ -3521,8 +3521,9 @@ int main (int argc, char *argv[])
|
|||
fprintf(stderr, "Warning: X11 not thread-safe\n");
|
||||
}
|
||||
|
||||
if (!g_thread_supported())
|
||||
#if !g_thread_supported()
|
||||
g_thread_init( NULL);
|
||||
#endif
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
|
|
|
@ -51,7 +51,9 @@
|
|||
* v1.00 - 2006-12-25 - Chishm
|
||||
* Original release
|
||||
*/
|
||||
#ifndef VERSION
|
||||
#define VERSION "v1.24"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
Loading…
Reference in New Issue