forked from len0rd/rockbox
misc: Properly annotate some intentional case fallthroughs
Change-Id: Ie758f17fefac72aca1aa28a8ba1126b9334fe134
This commit is contained in:
parent
83950bf233
commit
5b1158e64a
9 changed files with 13 additions and 9 deletions
|
@ -248,6 +248,7 @@ static int scrobbler_menu_action(int selection, bool has_log)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
case 10: /* Export & exit */
|
case 10: /* Export & exit */
|
||||||
{
|
{
|
||||||
res = configfile_save(CFG_FILE, config, gCfg_sz, CFG_VER);
|
res = configfile_save(CFG_FILE, config, gCfg_sz, CFG_VER);
|
||||||
|
|
|
@ -809,7 +809,7 @@ static int scrobbler_context_menu(struct printcell_data_t *pc_data)
|
||||||
|
|
||||||
if (find_type == FIND_ALL)
|
if (find_type == FIND_ALL)
|
||||||
find_type = FIND_INCLUDE;
|
find_type = FIND_INCLUDE;
|
||||||
/* fall-through */
|
/* fallthrough */
|
||||||
}
|
}
|
||||||
case 3: /*Custom Filter / Settings */
|
case 3: /*Custom Filter / Settings */
|
||||||
{
|
{
|
||||||
|
|
|
@ -254,6 +254,7 @@ static int stripdebug (lua_State *L, Proto *f, const int level) {
|
||||||
len += f->sizelineinfo;
|
len += f->sizelineinfo;
|
||||||
f->packedlineinfo = luaM_freearray(L, f->packedlineinfo, f->sizelineinfo, unsigned char);
|
f->packedlineinfo = luaM_freearray(L, f->packedlineinfo, f->sizelineinfo, unsigned char);
|
||||||
f->sizelineinfo = 0;
|
f->sizelineinfo = 0;
|
||||||
|
/* fallthrough */
|
||||||
case 2:
|
case 2:
|
||||||
len += f->sizelocvars * (sizeof(struct LocVar) + sizeof(dummy->tsv) + sizeof(struct LocVar *));
|
len += f->sizelocvars * (sizeof(struct LocVar) + sizeof(dummy->tsv) + sizeof(struct LocVar *));
|
||||||
f->locvars = luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar);
|
f->locvars = luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar);
|
||||||
|
@ -262,6 +263,7 @@ static int stripdebug (lua_State *L, Proto *f, const int level) {
|
||||||
f->sizeupvalues * (sizeof(dummy->tsv) + sizeof(TString *));
|
f->sizeupvalues * (sizeof(dummy->tsv) + sizeof(TString *));
|
||||||
f->sizelocvars = 0;
|
f->sizelocvars = 0;
|
||||||
f->sizeupvalues = 0;
|
f->sizeupvalues = 0;
|
||||||
|
/* fallthrough */
|
||||||
case 1:
|
case 1:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -510,7 +512,7 @@ static Instruction symbexec (const Proto *pt, int lastpc, int reg) {
|
||||||
case OP_FORLOOP:
|
case OP_FORLOOP:
|
||||||
case OP_FORPREP:
|
case OP_FORPREP:
|
||||||
checkreg(pt, a+3);
|
checkreg(pt, a+3);
|
||||||
/* go through */
|
/* fallthrough */
|
||||||
case OP_JMP: {
|
case OP_JMP: {
|
||||||
int dest = pc+1+b;
|
int dest = pc+1+b;
|
||||||
/* not full check and jump is forward and do not skip `lastpc'? */
|
/* not full check and jump is forward and do not skip `lastpc'? */
|
||||||
|
@ -733,4 +735,3 @@ void luaG_runerror (lua_State *L, const char *fmt, ...) {
|
||||||
va_end(argp);
|
va_end(argp);
|
||||||
luaG_errormsg(L);
|
luaG_errormsg(L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -367,6 +367,7 @@ static int llex (LexState *ls, SemInfo *seminfo) {
|
||||||
}
|
}
|
||||||
else if (sep == -1) return '[';
|
else if (sep == -1) return '[';
|
||||||
else luaX_lexerror(ls, "invalid long string delimiter", TK_STRING);
|
else luaX_lexerror(ls, "invalid long string delimiter", TK_STRING);
|
||||||
|
break; /* to avoid warnings */
|
||||||
}
|
}
|
||||||
case '=': {
|
case '=': {
|
||||||
next(ls);
|
next(ls);
|
||||||
|
@ -460,4 +461,3 @@ void luaX_lookahead (LexState *ls) {
|
||||||
lua_assert(ls->lookahead.token == TK_EOS);
|
lua_assert(ls->lookahead.token == TK_EOS);
|
||||||
ls->lookahead.token = llex(ls, &ls->lookahead.seminfo);
|
ls->lookahead.token = llex(ls, &ls->lookahead.seminfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -693,6 +693,7 @@ static intptr_t send_video_msg(long id, intptr_t data)
|
||||||
case VIDEO_PRINT_FRAME:
|
case VIDEO_PRINT_FRAME:
|
||||||
if (data)
|
if (data)
|
||||||
break;
|
break;
|
||||||
|
/* fallthrough */
|
||||||
case VIDEO_PRINT_THUMBNAIL:
|
case VIDEO_PRINT_THUMBNAIL:
|
||||||
if (disk_buf_status() != STREAM_STOPPED)
|
if (disk_buf_status() != STREAM_STOPPED)
|
||||||
break; /* Prepare image if not playing */
|
break; /* Prepare image if not playing */
|
||||||
|
|
|
@ -374,7 +374,7 @@ unsigned char* iso_decode_ex(const unsigned char *iso, unsigned char *utf8, int
|
||||||
ucs = table[tmp];
|
ucs = table[tmp];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
case CP_TID_936: /* Simplified Chinese */
|
case CP_TID_936: /* Simplified Chinese */
|
||||||
case CP_TID_949: /* Korean */
|
case CP_TID_949: /* Korean */
|
||||||
case CP_TID_950: /* Traditional Chinese */
|
case CP_TID_950: /* Traditional Chinese */
|
||||||
|
|
|
@ -889,7 +889,7 @@ unsigned int wakeup_thread_(struct thread_entry *thread
|
||||||
UNLOCK_THREAD(thread);
|
UNLOCK_THREAD(thread);
|
||||||
return THREAD_OK; /* timed out */
|
return THREAD_OK; /* timed out */
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
UNLOCK_THREAD(thread);
|
UNLOCK_THREAD(thread);
|
||||||
return THREAD_NONE;
|
return THREAD_NONE;
|
||||||
|
|
|
@ -788,7 +788,7 @@ static int jz_sd_exec_cmd(const int drive, struct sd_request *request)
|
||||||
(unsigned char *) ((unsigned int) request->response + 5);
|
(unsigned char *) ((unsigned int) request->response + 5);
|
||||||
request->block_len = 8;
|
request->block_len = 8;
|
||||||
request->nob = 1;
|
request->nob = 1;
|
||||||
|
/* fallthrough */
|
||||||
case SD_READ_DAT_UNTIL_STOP:
|
case SD_READ_DAT_UNTIL_STOP:
|
||||||
case SD_READ_SINGLE_BLOCK:
|
case SD_READ_SINGLE_BLOCK:
|
||||||
case SD_READ_MULTIPLE_BLOCK:
|
case SD_READ_MULTIPLE_BLOCK:
|
||||||
|
|
|
@ -170,6 +170,7 @@ static intptr_t misc_handler_configure(struct dsp_proc_entry *this,
|
||||||
dsp_pitch_update(dsp);
|
dsp_pitch_update(dsp);
|
||||||
#endif
|
#endif
|
||||||
value = (intptr_t)NULL; /* Default gains */
|
value = (intptr_t)NULL; /* Default gains */
|
||||||
|
/* fallthrough */
|
||||||
case REPLAYGAIN_SET_GAINS:
|
case REPLAYGAIN_SET_GAINS:
|
||||||
dsp_replaygain_set_gains((void *)value);
|
dsp_replaygain_set_gains((void *)value);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue