summaryrefslogtreecommitdiff
path: root/games-emulation/desmume/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-emulation/desmume/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-emulation/desmume/files')
-rw-r--r--games-emulation/desmume/files/desmume-0.9.11-fix-pointer-conversion-warning.diff11
-rw-r--r--games-emulation/desmume/files/desmume-0.9.11-gcc6.patch47
-rw-r--r--games-emulation/desmume/files/desmume-0.9.11-gcc7.patch21
3 files changed, 79 insertions, 0 deletions
diff --git a/games-emulation/desmume/files/desmume-0.9.11-fix-pointer-conversion-warning.diff b/games-emulation/desmume/files/desmume-0.9.11-fix-pointer-conversion-warning.diff
new file mode 100644
index 000000000000..8975085133ff
--- /dev/null
+++ b/games-emulation/desmume/files/desmume-0.9.11-fix-pointer-conversion-warning.diff
@@ -0,0 +1,11 @@
+--- a/src/path.h 2015-02-14 16:05:26.000000000 +0100
++++ b/src/path.h 2016-07-11 12:09:59.591987169 +0200
+@@ -375,7 +375,7 @@
+ else if (strchr(strftimeArgs, *p))
+ {
+ char tmp[MAX_PATH];
+- char format[] = { '%', *p, NULL };
++ char format[] = { '%', *p, '\0' };
+ strftime(tmp, MAX_PATH, format, time_struct);
+ file.append(tmp);
+ }
diff --git a/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch b/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch
new file mode 100644
index 000000000000..761ccef045cf
--- /dev/null
+++ b/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch
@@ -0,0 +1,47 @@
+--- a/src/wifi.cpp
++++ b/src/wifi.cpp
+@@ -314,9 +314,9 @@
+
+ #if (WIFI_LOGGING_LEVEL >= 1)
+ #if WIFI_LOG_USE_LOGC
+- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: "__VA_ARGS__);
++ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: " __VA_ARGS__);
+ #else
+- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: "__VA_ARGS__);
++ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: " __VA_ARGS__);
+ #endif
+ #else
+ #define WIFI_LOG(level, ...) {}
+--- a/src/MMU_timing.h
++++ b/src/MMU_timing.h
+@@ -155,8 +155,8 @@
+ enum { ASSOCIATIVITY = 1 << ASSOCIATIVESHIFT };
+ enum { BLOCKSIZE = 1 << BLOCKSIZESHIFT };
+ enum { TAGSHIFT = SIZESHIFT - ASSOCIATIVESHIFT };
+- enum { TAGMASK = (u32)(~0 << TAGSHIFT) };
+- enum { BLOCKMASK = ((u32)~0 >> (32 - TAGSHIFT)) & (u32)(~0 << BLOCKSIZESHIFT) };
++ enum { TAGMASK = (u32)(~0U << TAGSHIFT) };
++ enum { BLOCKMASK = ((u32)~0U >> (32 - TAGSHIFT)) & (u32)(~0U << BLOCKSIZESHIFT) };
+ enum { WORDSIZE = sizeof(u32) };
+ enum { WORDSPERBLOCK = (1 << BLOCKSIZESHIFT) / WORDSIZE };
+ enum { DATAPERWORD = WORDSIZE * ASSOCIATIVITY };
+--- a/src/ctrlssdl.cpp
++++ b/src/ctrlssdl.cpp
+@@ -200,7 +200,7 @@
+ break;
+ case SDL_JOYAXISMOTION:
+ /* Dead zone of 50% */
+- if( (abs(event.jaxis.value) >> 14) != 0 )
++ if( ((u32)abs(event.jaxis.value) >> 14) != 0 )
+ {
+ key = ((event.jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event.jaxis.axis & 127) << 1);
+ if (event.jaxis.value > 0) {
+@@ -370,7 +370,7 @@
+ Note: button constants have a 1bit offset. */
+ case SDL_JOYAXISMOTION:
+ key_code = ((event->jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event->jaxis.axis & 127) << 1);
+- if( (abs(event->jaxis.value) >> 14) != 0 )
++ if( ((u32)abs(event->jaxis.value) >> 14) != 0 )
+ {
+ if (event->jaxis.value > 0)
+ key_code |= 1;
diff --git a/games-emulation/desmume/files/desmume-0.9.11-gcc7.patch b/games-emulation/desmume/files/desmume-0.9.11-gcc7.patch
new file mode 100644
index 000000000000..8b8a67f2291a
--- /dev/null
+++ b/games-emulation/desmume/files/desmume-0.9.11-gcc7.patch
@@ -0,0 +1,21 @@
+Bug: https://bugs.gentoo.org/646352
+Patch: https://sources.debian.org/data/main/d/desmume/0.9.11-3/debian/patches/gcc7_fixes.patch
+
+From e1f7039f1b06add4fb75b2f8774000b8f05574af Mon Sep 17 00:00:00 2001
+From: rogerman <rogerman@users.sf.net>
+Date: Mon, 17 Aug 2015 21:15:04 +0000
+Subject: Fix bug with libfat string handling.
+
+diff --git a/src/utils/libfat/directory.cpp b/src/utils/libfat/directory.cpp
+index 765d7ae5..b6d7f01f 100644
+--- a/src/utils/libfat/directory.cpp
++++ b/src/utils/libfat/directory.cpp
+@@ -139,7 +139,7 @@ static size_t _FAT_directory_mbstoucs2 (ucs2_t* dst, const char* src, size_t len
+ int bytes;
+ size_t count = 0;
+
+- while (count < len-1 && src != '\0') {
++ while (count < len-1 && *src != '\0') {
+ bytes = mbrtowc (&tempChar, src, MB_CUR_MAX, &ps);
+ if (bytes > 0) {
+ *dst = (ucs2_t)tempChar;