Skip to content

Rpi H265 driver generates warning when build with clang14 #5078

@arenekosreal

Description

@arenekosreal

Describe the bug

When build kernel with clang14, there will be a warning says unannotated fall-through between switch labels when build Rpi H265 driver, it will become an error if enabled Compile the kernel with warnings as errors option.

Steps to reproduce the behaviour

  1. Prepare a host and the source code, branch is rpi-5.19.y. Note: Using clang14 for building.
  2. Build the kernel source code.

Device (s)

Raspberry Pi 4 Mod. B

System

N/A

Logs

Clang Output:

  CC [M]  drivers/staging/media/rpivid/rpivid_h265.o
drivers/staging/media/rpivid/rpivid_h265.c:1714:3: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
                case RPIVID_DECODE_ERROR_CONTINUE:
                ^
drivers/staging/media/rpivid/rpivid_h265.c:1714:3: note: insert '__attribute__((fallthrough));' to silence this warning
                case RPIVID_DECODE_ERROR_CONTINUE:
                ^
                __attribute__((fallthrough)); 
drivers/staging/media/rpivid/rpivid_h265.c:1714:3: note: insert 'break;' to avoid fall-through
                case RPIVID_DECODE_ERROR_CONTINUE:
                ^
                break; 
1 error generated.

I have enabled Compile the kernel with warnings as errors option so this warning is treated as an error.

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions