Silence a number of clang compiler warnings on Linux

This commit is contained in:
Aaron Culliney 2014-10-25 08:44:21 -07:00
parent 737c780929
commit 551cc00781
6 changed files with 7 additions and 6 deletions

View File

@ -238,12 +238,12 @@ static VOICE SSI263Voice[MAX_VOICES];
static VOICE SSI263Voice[MAX_VOICES] = {0};
#endif
static const int g_nNumEvents = 2;
#ifdef APPLE2IX
static pthread_cond_t mockingboard_cond = PTHREAD_COND_INITIALIZER;
static pthread_mutex_t mockingboard_mutex = PTHREAD_MUTEX_INITIALIZER;
static uint8_t quit_event = false;
#else
static const int g_nNumEvents = 2;
static HANDLE g_hSSI263Event[g_nNumEvents] = {NULL}; // 1: Phoneme finished playing, 2: Exit thread
static DWORD g_dwMaxPhonemeLen = 0;
#endif

View File

@ -27,7 +27,7 @@
static uint8_t vga_mem_page_0[SCANWIDTH*SCANHEIGHT];
static uint8_t vga_mem_page_1[SCANWIDTH*SCANHEIGHT];
A2Color colormap[256] = { 0 };
A2Color colormap[256] = { { 0 } };
uint8_t video__wider_font[0x8000];
uint8_t video__font[0x4000];

View File

@ -1613,6 +1613,6 @@ static void *interface_thread(void *current_key)
void c_interface_begin(int current_key)
{
pthread_t t = 0;
pthread_create(&t, NULL, (void *) &interface_thread, (void *)current_key);
pthread_create(&t, NULL, (void *)&interface_thread, (void *)((__SWORD_TYPE)current_key));
}

View File

@ -339,7 +339,7 @@ void CpuCalcCycles(const unsigned long nExecutedCycles)
g_nCumulativeCycles += nCycles;
// HACK FIXME TODO
#pragma clang diagnostic push
#pragma clang diagnostic ignored "--Wshorten-64-to-32"
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
g_nCyclesExecuted = nExecutedCycles;
#pragma clang diagnostic pop
}

View File

@ -16,6 +16,7 @@
#include "video/renderer.h"
#include "video_util/modelUtil.h"
#include "video_util/matrixUtil.h"
#include "video_util/sourceUtil.h"
#ifdef __APPLE__
@ -726,7 +727,7 @@ void video_driver_init(void *fbo) {
#if defined(__APPLE__)
gldriver_init_common();
#elif USE_GLUT
gldriver_init_glut(fbo);
gldriver_init_glut(defaultFBO);
#else
#error no working codepaths
#endif

View File

@ -56,7 +56,7 @@ demoModel *mdlLoadModel(const char *filepathname) {
return NULL;
}
modelHeader header = { 0 };
modelHeader header = { { 0 } };
sizeRead = fread(&header, 1, sizeof(modelHeader), curFile);
if (sizeRead != sizeof(modelHeader)) {
fclose(curFile);