Merge pull request #207 from cosmo-ray/fix-linux-gcc8.2-warnings

Fix gcc8.2 warnings on linux
This commit is contained in:
zeromus 2018-12-05 14:10:52 -06:00 committed by GitHub
commit d80a84b762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 8 deletions

View File

@ -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;

View File

@ -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();

View File

@ -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);

View File

@ -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);

View File

@ -25,6 +25,7 @@
#endif
#include <stdlib.h>
#include <string.h>
#include <boolean.h>
#include <rthreads/rthreads.h>

View File

@ -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>