Document intentional fallthroughs.
Found by: Coverity scan.
This commit is contained in:
parent
8f95eae423
commit
9ee5ae1fae
11 changed files with 17 additions and 2 deletions
|
@ -71,10 +71,12 @@ is_lv_readable (struct grub_diskfilter_lv *lv, int easily)
|
||||||
case GRUB_DISKFILTER_RAID6:
|
case GRUB_DISKFILTER_RAID6:
|
||||||
if (!easily)
|
if (!easily)
|
||||||
need--;
|
need--;
|
||||||
|
/* Fallthrough. */
|
||||||
case GRUB_DISKFILTER_RAID4:
|
case GRUB_DISKFILTER_RAID4:
|
||||||
case GRUB_DISKFILTER_RAID5:
|
case GRUB_DISKFILTER_RAID5:
|
||||||
if (!easily)
|
if (!easily)
|
||||||
need--;
|
need--;
|
||||||
|
/* Fallthrough. */
|
||||||
case GRUB_DISKFILTER_STRIPED:
|
case GRUB_DISKFILTER_STRIPED:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -584,6 +586,7 @@ read_segment (struct grub_diskfilter_segment *seg, grub_disk_addr_t sector,
|
||||||
if (seg->node_count == 1)
|
if (seg->node_count == 1)
|
||||||
return grub_diskfilter_read_node (&seg->nodes[0],
|
return grub_diskfilter_read_node (&seg->nodes[0],
|
||||||
sector, size, buf);
|
sector, size, buf);
|
||||||
|
/* Fallthrough. */
|
||||||
case GRUB_DISKFILTER_MIRROR:
|
case GRUB_DISKFILTER_MIRROR:
|
||||||
case GRUB_DISKFILTER_RAID10:
|
case GRUB_DISKFILTER_RAID10:
|
||||||
{
|
{
|
||||||
|
|
|
@ -1286,7 +1286,7 @@ blit_comb (const struct grub_unicode_glyph *glyph_id,
|
||||||
- grub_font_get_xheight (combining_glyphs[i]->font) - 1;
|
- grub_font_get_xheight (combining_glyphs[i]->font) - 1;
|
||||||
if (space <= 0)
|
if (space <= 0)
|
||||||
space = 1 + (grub_font_get_xheight (main_glyph->font)) / 8;
|
space = 1 + (grub_font_get_xheight (main_glyph->font)) / 8;
|
||||||
|
/* Fallthrough. */
|
||||||
case GRUB_UNICODE_STACK_ATTACHED_ABOVE:
|
case GRUB_UNICODE_STACK_ATTACHED_ABOVE:
|
||||||
do_blit (combining_glyphs[i], targetx,
|
do_blit (combining_glyphs[i], targetx,
|
||||||
-(ctx.bounds.height + ctx.bounds.y + space
|
-(ctx.bounds.height + ctx.bounds.y + space
|
||||||
|
@ -1327,6 +1327,7 @@ blit_comb (const struct grub_unicode_glyph *glyph_id,
|
||||||
+ combining_glyphs[i]->height);
|
+ combining_glyphs[i]->height);
|
||||||
if (space <= 0)
|
if (space <= 0)
|
||||||
space = 1 + (grub_font_get_xheight (main_glyph->font)) / 8;
|
space = 1 + (grub_font_get_xheight (main_glyph->font)) / 8;
|
||||||
|
/* Fallthrough. */
|
||||||
|
|
||||||
case GRUB_UNICODE_STACK_ATTACHED_BELOW:
|
case GRUB_UNICODE_STACK_ATTACHED_BELOW:
|
||||||
do_blit (combining_glyphs[i], targetx, -(ctx.bounds.y - space),
|
do_blit (combining_glyphs[i], targetx, -(ctx.bounds.y - space),
|
||||||
|
|
|
@ -986,6 +986,7 @@ grub_udf_read_symlink (grub_fshelp_node_t node)
|
||||||
case 1:
|
case 1:
|
||||||
if (ptr[1])
|
if (ptr[1])
|
||||||
goto fail;
|
goto fail;
|
||||||
|
/* Fallthrough. */
|
||||||
case 2:
|
case 2:
|
||||||
/* in 4 bytes. out: 1 byte. */
|
/* in 4 bytes. out: 1 byte. */
|
||||||
optr = out;
|
optr = out;
|
||||||
|
|
|
@ -664,6 +664,7 @@ grub_legacy_parse (const char *buf, char **entryname, char **suffix)
|
||||||
{
|
{
|
||||||
case TYPE_FILE_NO_CONSUME:
|
case TYPE_FILE_NO_CONSUME:
|
||||||
hold_arg = 1;
|
hold_arg = 1;
|
||||||
|
/* Fallthrough. */
|
||||||
case TYPE_PARTITION:
|
case TYPE_PARTITION:
|
||||||
case TYPE_FILE:
|
case TYPE_FILE:
|
||||||
args[i] = adjust_file (curarg, curarglen);
|
args[i] = adjust_file (curarg, curarglen);
|
||||||
|
|
|
@ -280,10 +280,13 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||||
{
|
{
|
||||||
case 'g':
|
case 'g':
|
||||||
shift += 10;
|
shift += 10;
|
||||||
|
/* Fallthrough. */
|
||||||
case 'm':
|
case 'm':
|
||||||
shift += 10;
|
shift += 10;
|
||||||
|
/* Fallthrough. */
|
||||||
case 'k':
|
case 'k':
|
||||||
shift += 10;
|
shift += 10;
|
||||||
|
/* Fallthrough. */
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -929,6 +929,7 @@ grub_bidi_line_logical_to_visual (const grub_uint32_t *logical,
|
||||||
case GRUB_BIDI_TYPE_R:
|
case GRUB_BIDI_TYPE_R:
|
||||||
case GRUB_BIDI_TYPE_AL:
|
case GRUB_BIDI_TYPE_AL:
|
||||||
bidi_needed = 1;
|
bidi_needed = 1;
|
||||||
|
/* Fallthrough. */
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (join_state == JOIN_FORCE)
|
if (join_state == JOIN_FORCE)
|
||||||
|
|
|
@ -359,6 +359,7 @@ grub_video_bochs_setup (unsigned int width, unsigned int height,
|
||||||
case 32:
|
case 32:
|
||||||
framebuffer.mode_info.reserved_mask_size = 8;
|
framebuffer.mode_info.reserved_mask_size = 8;
|
||||||
framebuffer.mode_info.reserved_field_pos = 24;
|
framebuffer.mode_info.reserved_field_pos = 24;
|
||||||
|
/* Fallthrough. */
|
||||||
|
|
||||||
case 24:
|
case 24:
|
||||||
framebuffer.mode_info.red_mask_size = 8;
|
framebuffer.mode_info.red_mask_size = 8;
|
||||||
|
|
|
@ -440,6 +440,7 @@ grub_video_cirrus_setup (unsigned int width, unsigned int height,
|
||||||
case 32:
|
case 32:
|
||||||
framebuffer.mode_info.reserved_mask_size = 8;
|
framebuffer.mode_info.reserved_mask_size = 8;
|
||||||
framebuffer.mode_info.reserved_field_pos = 24;
|
framebuffer.mode_info.reserved_field_pos = 24;
|
||||||
|
/* Fallthrough. */
|
||||||
|
|
||||||
case 24:
|
case 24:
|
||||||
framebuffer.mode_info.red_mask_size = 8;
|
framebuffer.mode_info.red_mask_size = 8;
|
||||||
|
|
|
@ -874,6 +874,7 @@ vbe2videoinfo (grub_uint32_t mode,
|
||||||
/* CGA is basically 4-bit packed pixel. */
|
/* CGA is basically 4-bit packed pixel. */
|
||||||
case GRUB_VBE_MEMORY_MODEL_CGA:
|
case GRUB_VBE_MEMORY_MODEL_CGA:
|
||||||
mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_CGA;
|
mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_CGA;
|
||||||
|
/* Fallthrough. */
|
||||||
case GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL:
|
case GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL:
|
||||||
mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
|
mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
|
||||||
break;
|
break;
|
||||||
|
@ -886,6 +887,7 @@ vbe2videoinfo (grub_uint32_t mode,
|
||||||
/* Non chain 4 is a special case of planar. */
|
/* Non chain 4 is a special case of planar. */
|
||||||
case GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256:
|
case GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256:
|
||||||
mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_NONCHAIN4;
|
mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_NONCHAIN4;
|
||||||
|
/* Fallthrough. */
|
||||||
case GRUB_VBE_MEMORY_MODEL_PLANAR:
|
case GRUB_VBE_MEMORY_MODEL_PLANAR:
|
||||||
mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_PLANAR
|
mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_PLANAR
|
||||||
| GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
|
| GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
|
||||||
|
|
|
@ -107,6 +107,7 @@ grub_util_pull_device (const char *os_dev)
|
||||||
default:
|
default:
|
||||||
if (grub_util_pull_device_os (os_dev, ab))
|
if (grub_util_pull_device_os (os_dev, ab))
|
||||||
return;
|
return;
|
||||||
|
/* Fallthrough. */
|
||||||
case GRUB_DEV_ABSTRACTION_NONE:
|
case GRUB_DEV_ABSTRACTION_NONE:
|
||||||
free (grub_util_biosdisk_get_grub_dev (os_dev));
|
free (grub_util_biosdisk_get_grub_dev (os_dev));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1809,7 +1809,7 @@ main (int argc, char *argv[])
|
||||||
grub_install_copy_file (imgfile, dst, 1);
|
grub_install_copy_file (imgfile, dst, 1);
|
||||||
free (dst);
|
free (dst);
|
||||||
}
|
}
|
||||||
|
/* Fallthrough. */
|
||||||
case GRUB_INSTALL_PLATFORM_X86_64_EFI:
|
case GRUB_INSTALL_PLATFORM_X86_64_EFI:
|
||||||
if (efidir_is_mac)
|
if (efidir_is_mac)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue