mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
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;
|
||||
}
|
||||
}
|
||||
/* fallthrough */
|
||||
case 10: /* Export & exit */
|
||||
{
|
||||
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)
|
||||
find_type = FIND_INCLUDE;
|
||||
/* fall-through */
|
||||
/* fallthrough */
|
||||
}
|
||||
case 3: /*Custom Filter / Settings */
|
||||
{
|
||||
|
|
|
@ -254,6 +254,7 @@ static int stripdebug (lua_State *L, Proto *f, const int level) {
|
|||
len += f->sizelineinfo;
|
||||
f->packedlineinfo = luaM_freearray(L, f->packedlineinfo, f->sizelineinfo, unsigned char);
|
||||
f->sizelineinfo = 0;
|
||||
/* fallthrough */
|
||||
case 2:
|
||||
len += f->sizelocvars * (sizeof(struct LocVar) + sizeof(dummy->tsv) + sizeof(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->sizelocvars = 0;
|
||||
f->sizeupvalues = 0;
|
||||
/* fallthrough */
|
||||
case 1:
|
||||
default:
|
||||
break;
|
||||
|
@ -510,7 +512,7 @@ static Instruction symbexec (const Proto *pt, int lastpc, int reg) {
|
|||
case OP_FORLOOP:
|
||||
case OP_FORPREP:
|
||||
checkreg(pt, a+3);
|
||||
/* go through */
|
||||
/* fallthrough */
|
||||
case OP_JMP: {
|
||||
int dest = pc+1+b;
|
||||
/* 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);
|
||||
luaG_errormsg(L);
|
||||
}
|
||||
|
||||
|
|
|
@ -367,6 +367,7 @@ static int llex (LexState *ls, SemInfo *seminfo) {
|
|||
}
|
||||
else if (sep == -1) return '[';
|
||||
else luaX_lexerror(ls, "invalid long string delimiter", TK_STRING);
|
||||
break; /* to avoid warnings */
|
||||
}
|
||||
case '=': {
|
||||
next(ls);
|
||||
|
@ -460,4 +461,3 @@ void luaX_lookahead (LexState *ls) {
|
|||
lua_assert(ls->lookahead.token == TK_EOS);
|
||||
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:
|
||||
if (data)
|
||||
break;
|
||||
/* fallthrough */
|
||||
case VIDEO_PRINT_THUMBNAIL:
|
||||
if (disk_buf_status() != STREAM_STOPPED)
|
||||
break; /* Prepare image if not playing */
|
||||
|
@ -1132,7 +1133,7 @@ int stream_init(void)
|
|||
rb->splash(HZ, "Parser init failed!");
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
return STREAM_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ unsigned char* iso_decode_ex(const unsigned char *iso, unsigned char *utf8, int
|
|||
ucs = table[tmp];
|
||||
break;
|
||||
}
|
||||
|
||||
/* fallthrough */
|
||||
case CP_TID_936: /* Simplified Chinese */
|
||||
case CP_TID_949: /* Korean */
|
||||
case CP_TID_950: /* Traditional Chinese */
|
||||
|
|
|
@ -889,7 +889,7 @@ unsigned int wakeup_thread_(struct thread_entry *thread
|
|||
UNLOCK_THREAD(thread);
|
||||
return THREAD_OK; /* timed out */
|
||||
}
|
||||
|
||||
/* fallthrough */
|
||||
default:
|
||||
UNLOCK_THREAD(thread);
|
||||
return THREAD_NONE;
|
||||
|
@ -1044,7 +1044,7 @@ void switch_thread(void)
|
|||
break;
|
||||
|
||||
thread = NULL;
|
||||
|
||||
|
||||
/* Enter sleep mode to reduce power usage */
|
||||
RTR_UNLOCK(corep);
|
||||
core_sleep(IF_COP(core));
|
||||
|
|
|
@ -788,7 +788,7 @@ static int jz_sd_exec_cmd(const int drive, struct sd_request *request)
|
|||
(unsigned char *) ((unsigned int) request->response + 5);
|
||||
request->block_len = 8;
|
||||
request->nob = 1;
|
||||
|
||||
/* fallthrough */
|
||||
case SD_READ_DAT_UNTIL_STOP:
|
||||
case SD_READ_SINGLE_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);
|
||||
#endif
|
||||
value = (intptr_t)NULL; /* Default gains */
|
||||
/* fallthrough */
|
||||
case REPLAYGAIN_SET_GAINS:
|
||||
dsp_replaygain_set_gains((void *)value);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue