diff --git a/libs/audio/cd_file.c b/libs/audio/cd_file.c index ce0f2b94f..94d394154 100644 --- a/libs/audio/cd_file.c +++ b/libs/audio/cd_file.c @@ -454,7 +454,7 @@ Mus_VolChange (cvar_t *bgmvolume) static void Mus_gamedir (int phase) { - if (phase); + if (phase) Mus_OggChange (mus_ogglist); } diff --git a/libs/audio/renderer/midi.c b/libs/audio/renderer/midi.c index 86898da65..c4f44a050 100644 --- a/libs/audio/renderer/midi.c +++ b/libs/audio/renderer/midi.c @@ -105,7 +105,7 @@ midi_stream_read (void *file, float **buf) int res; byte *data = alloca (size); - res = WildMidi_GetOutput (mf->handle, (char *)data, size); + res = WildMidi_GetOutput (mf->handle, (int8_t *)data, size); if (res <= 0) { stream->error = 1; return 0; diff --git a/libs/video/targets/context_x11.c b/libs/video/targets/context_x11.c index dc9ae9a0c..41045fcdf 100644 --- a/libs/video/targets/context_x11.c +++ b/libs/video/targets/context_x11.c @@ -406,7 +406,7 @@ X11_SetVidMode (int width, int height) vid_gamma_avail = true; temp = X11_GetGamma (); - if (temp && temp[0] > 0) { + if (temp && (*temp)[0] > 0) { x_gamma[0] = (*temp)[0]; x_gamma[1] = (*temp)[1]; x_gamma[2] = (*temp)[2]; diff --git a/tools/qfbsp/source/brush.c b/tools/qfbsp/source/brush.c index f27c253b8..940fddfb4 100644 --- a/tools/qfbsp/source/brush.c +++ b/tools/qfbsp/source/brush.c @@ -736,7 +736,7 @@ LoadBrush (const mbrush_t *mb, int hullnum) CreateBrushFaces (); } else if (mb->detail) { face_t *f; - for (f = brush_faces; f; f = f->next); + for (f = brush_faces; f; f = f->next) f->detail = 1; } diff --git a/tools/qfcc/source/flow.c b/tools/qfcc/source/flow.c index 2c6692f1d..c611fd0a8 100644 --- a/tools/qfcc/source/flow.c +++ b/tools/qfcc/source/flow.c @@ -981,7 +981,7 @@ flow_make_edges (flowgraph_t *graph) flownode_t *node; set_iter_t *succ; - if (graph->edges); + if (graph->edges) free (graph->edges); graph->edges = malloc (graph->num_edges * sizeof (flowedge_t)); for (j = 0, i = 0; i < graph->num_nodes + 2; i++) { diff --git a/tools/qfcc/source/qc-lex.l b/tools/qfcc/source/qc-lex.l index 7d190cb48..14cc1265f 100644 --- a/tools/qfcc/source/qc-lex.l +++ b/tools/qfcc/source/qc-lex.l @@ -442,6 +442,8 @@ keyword_or_id (char *token) #ifdef YY_FLEX_REALLOC_HACK static __attribute__ ((used)) void *(*const yy_flex_realloc_hack)(void *,yy_size_t) = yy_flex_realloc; #else +#ifdef yyunput static __attribute__ ((used)) void (*yyunput_hack)(int, char*) = yyunput; +#endif static __attribute__ ((used)) int (*input_hack)(void) = input; #endif