gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / patches / desmume-gcc6-fixes.patch
1 From: zeromus
2 Origin: upstream, https://sourceforge.net/p/desmume/code/5514, https://sourceforge.net/p/desmume/code/5517, https://sourceforge.net/p/desmume/code/5430
3 Subject: fix GCC6 issues
4 Bug: https://sourceforge.net/p/desmume/bugs/1570/
5 Bug-Debian: http://bugs.debian.org/811691
6
7 Index: desmume/src/MMU_timing.h
8 ===================================================================
9 --- desmume/src/MMU_timing.h (revision 5513)
10 +++ desmume/src/MMU_timing.h (revision 5517)
11 @@ -155,8 +155,8 @@
12 enum { ASSOCIATIVITY = 1 << ASSOCIATIVESHIFT };
13 enum { BLOCKSIZE = 1 << BLOCKSIZESHIFT };
14 enum { TAGSHIFT = SIZESHIFT - ASSOCIATIVESHIFT };
15 - enum { TAGMASK = (u32)(~0 << TAGSHIFT) };
16 - enum { BLOCKMASK = ((u32)~0 >> (32 - TAGSHIFT)) & (u32)(~0 << BLOCKSIZESHIFT) };
17 + enum { TAGMASK = (u32)(~0U << TAGSHIFT) };
18 + enum { BLOCKMASK = ((u32)~0U >> (32 - TAGSHIFT)) & (u32)(~0U << BLOCKSIZESHIFT) };
19 enum { WORDSIZE = sizeof(u32) };
20 enum { WORDSPERBLOCK = (1 << BLOCKSIZESHIFT) / WORDSIZE };
21 enum { DATAPERWORD = WORDSIZE * ASSOCIATIVITY };
22 Index: desmume/src/ctrlssdl.cpp
23 ===================================================================
24 --- desmume/src/ctrlssdl.cpp (revision 5513)
25 +++ desmume/src/ctrlssdl.cpp (revision 5517)
26 @@ -200,7 +200,7 @@
27 break;
28 case SDL_JOYAXISMOTION:
29 /* Dead zone of 50% */
30 - if( (abs(event.jaxis.value) >> 14) != 0 )
31 + if( ((u32)abs(event.jaxis.value) >> 14) != 0 )
32 {
33 key = ((event.jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event.jaxis.axis & 127) << 1);
34 if (event.jaxis.value > 0) {
35 @@ -370,7 +370,7 @@
36 Note: button constants have a 1bit offset. */
37 case SDL_JOYAXISMOTION:
38 key_code = ((event->jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event->jaxis.axis & 127) << 1);
39 - if( (abs(event->jaxis.value) >> 14) != 0 )
40 + if( ((u32)abs(event->jaxis.value) >> 14) != 0 )
41 {
42 if (event->jaxis.value > 0)
43 key_code |= 1;
44 Index: desmume/src/wifi.cpp
45 ===================================================================
46 --- desmume/src/wifi.cpp (revision 5429)
47 +++ desmume/src/wifi.cpp (revision 5430)
48 @@ -320,9 +320,9 @@
49
50 #if (WIFI_LOGGING_LEVEL >= 1)
51 #if WIFI_LOG_USE_LOGC
52 - #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: "__VA_ARGS__);
53 + #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: " __VA_ARGS__);
54 #else
55 - #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: "__VA_ARGS__);
56 + #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: " __VA_ARGS__);
57 #endif
58 #else
59 #define WIFI_LOG(level, ...) {}