From 6fdeee38961b70771aefc9ed7f92fbe578d6fe28 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Fri, 31 Oct 2014 10:53:10 -0700 Subject: [PATCH] Cleanup and fixes for compiler warnings --- src/apple2.h | 2 +- src/interface.c | 2 +- src/video/glvideo.c | 3 +++ src/x86/cpu-regs.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/apple2.h b/src/apple2.h index 189eb6fd..67a1c2ec 100644 --- a/src/apple2.h +++ b/src/apple2.h @@ -37,7 +37,7 @@ # define APPLE_ASSEMBLER_IS_BROKEN 1 # define SN(foo) _##foo(%rip) # define SNX(foo, INDEX, SCALE) (_X8,INDEX,SCALE) -# if defined(__LP64__) +# ifdef __LP64__ # define SNX_PROLOGUE(foo) leaLQ _##foo(%rip), _X8; # else # error "Building 32bit Darwin/x86 is not supported (unless you're a go-getter and make it supported)" diff --git a/src/interface.c b/src/interface.c index 7aa76119..fcf21068 100644 --- a/src/interface.c +++ b/src/interface.c @@ -1559,7 +1559,7 @@ static void *interface_thread(void *current_key) #endif in_interface = true; - switch ((int)current_key) { + switch ((__SWORD_TYPE)current_key) { #ifdef INTERFACE_CLASSIC case kF1: c_interface_select_diskette( 0 ); diff --git a/src/video/glvideo.c b/src/video/glvideo.c index 4a0cd57b..dec1f908 100644 --- a/src/video/glvideo.c +++ b/src/video/glvideo.c @@ -723,7 +723,10 @@ static void gldriver_init_glut(GLuint fbo) { // renderer API void video_driver_init(void *fbo) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpointer-to-int-cast" defaultFBO = (GLuint)fbo; +#pragma GCC diagnostic pop #if defined(__APPLE__) gldriver_init_common(); #elif USE_GLUT diff --git a/src/x86/cpu-regs.h b/src/x86/cpu-regs.h index ea13537f..2f082f13 100644 --- a/src/x86/cpu-regs.h +++ b/src/x86/cpu-regs.h @@ -36,7 +36,7 @@ subLQ SN(base_vmem), _XAX; \ orLQ _XAX, SP_Reg_X; -#if __LP64__ +#ifdef __LP64__ # define SZ_PTR 8 # define ROR_BIT 63 // x86_64 registers