forked from len0rd/rockbox
misc: Fix a small pile of warnings found with diagnostics turned way up
* possible null pointer dereferences * non-annotated fallthroughs in case statements Change-Id: I2332e0e0a4203ceca0999291ead112b8ab94c613
This commit is contained in:
parent
d51d49550c
commit
34f34bb7f1
9 changed files with 46 additions and 43 deletions
|
@ -1735,6 +1735,7 @@ static void typingProcess(void){
|
|||
clearOperand();
|
||||
calStatus = cal_typing;
|
||||
/* go on typing, no break */
|
||||
/* Intentional fallthrough */
|
||||
case cal_typing:
|
||||
case cal_dotted:
|
||||
switch(CAL_BUTTON){
|
||||
|
|
|
@ -1304,7 +1304,7 @@ read_comment_sgf (char *buffer, size_t buffer_size)
|
|||
{
|
||||
break;
|
||||
}
|
||||
|
||||
/* Intentional fallthrough */
|
||||
default:
|
||||
*buffer = temp;
|
||||
++buffer;
|
||||
|
|
|
@ -152,6 +152,7 @@ free_tree_sgf (void)
|
|||
{
|
||||
rb->splash (5 * HZ,
|
||||
"Error allocating first node! Please exit immediately.");
|
||||
return;
|
||||
}
|
||||
|
||||
get_node (tree_head)->props = NO_PROP;
|
||||
|
@ -498,4 +499,3 @@ get_prop (int handle)
|
|||
}
|
||||
return &(storage_buffer[index][handle].prop);
|
||||
}
|
||||
|
||||
|
|
|
@ -406,6 +406,7 @@ static int ask_and_get_audio_buffer(const char *filename)
|
|||
break;
|
||||
#endif
|
||||
#endif
|
||||
/* Intentional fallthrough */
|
||||
case IMGVIEW_MENU:
|
||||
return PLUGIN_OK;
|
||||
|
||||
|
|
|
@ -809,8 +809,7 @@ static int scrobbler_context_menu(struct printcell_data_t *pc_data)
|
|||
|
||||
if (find_type == FIND_ALL)
|
||||
find_type = FIND_INCLUDE;
|
||||
/* fallthrough */
|
||||
}
|
||||
} /* fall-through */
|
||||
case 3: /*Custom Filter / Settings */
|
||||
{
|
||||
if (col == -1)/*Settings*/
|
||||
|
|
|
@ -655,7 +655,7 @@ void ugen_connect(t_dspcontext *dc, t_object *x1, int outno, t_object *x2,
|
|||
for (u2 = dc->dc_ugenlist; u2 && u2->u_obj != x2; u2 = u2->u_next);
|
||||
if (!u1 || !u2 || siginno < 0)
|
||||
{
|
||||
pd_error(u1->u_obj,
|
||||
pd_error((u1 ? u1->u_obj : NULL),
|
||||
"signal outlet connect to nonsignal inlet (ignored)");
|
||||
return;
|
||||
}
|
||||
|
@ -1159,4 +1159,3 @@ void d_ugen_setup(void) /* really just block_setup */
|
|||
class_addmethod(block_class, (t_method)block_dsp, gensym("dsp"), 0);
|
||||
class_addfloat(block_class, block_float);
|
||||
}
|
||||
|
||||
|
|
|
@ -713,6 +713,7 @@ void pd_typedmess(t_pd *x, t_symbol *s, int argc, t_atom *argv)
|
|||
break;
|
||||
case A_FLOAT:
|
||||
if (!argc) goto badarg;
|
||||
/* Intentional fallthrough */
|
||||
case A_DEFFLOAT:
|
||||
if (!argc) *dp = 0;
|
||||
else
|
||||
|
@ -727,6 +728,7 @@ void pd_typedmess(t_pd *x, t_symbol *s, int argc, t_atom *argv)
|
|||
break;
|
||||
case A_SYMBOL:
|
||||
if (!argc) goto badarg;
|
||||
/* Intentional fallthrough */
|
||||
case A_DEFSYM:
|
||||
if (!argc) *ap = (t_int)(&s_);
|
||||
else
|
||||
|
@ -861,4 +863,3 @@ t_gotfn zgetfn(t_pd *x, t_symbol *s)
|
|||
if (m->me_name == s) return(m->me_fun);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -269,6 +269,7 @@ static byte ioreg_read(byte r)
|
|||
case RI_HDMA4:
|
||||
case RI_HDMA5:
|
||||
if (hw.cgb) return REG(r);
|
||||
/* Intentional fallthrough */
|
||||
default:
|
||||
return 0xff;
|
||||
}
|
||||
|
|
|
@ -88,6 +88,7 @@ void audio_input_mux(int source, unsigned flags)
|
|||
{
|
||||
default: /* playback - no recording */
|
||||
source = AUDIO_SRC_PLAYBACK;
|
||||
/* Intentional fallthrough */
|
||||
case AUDIO_SRC_PLAYBACK:
|
||||
#ifdef HAVE_RECORDING
|
||||
if (source != last_source)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue