Skip to content

Commit 4db2196

Browse files
Marek VasutLey Foon Tan
authored andcommitted
nios2: Fix unused variable warning
Fix the following compiler splat by adding __maybe_unused annotation to the variable. Using this particular annotation has the least ugly impact on the code compared to using ifdeffery. arch/nios2/kernel/setup.c: In function 'nios2_boot_init': arch/nios2/kernel/setup.c:107:7: warning: unused variable 'cmdline_passed' [-Wunused-variable] char cmdline_passed[COMMAND_LINE_SIZE] = { 0, }; ^ Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Ley Foon Tan <lftan@altera.com>
1 parent 6a13feb commit 4db2196

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/nios2/kernel/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ asmlinkage void __init nios2_boot_init(unsigned r4, unsigned r5, unsigned r6,
104104
unsigned r7)
105105
{
106106
unsigned dtb_passed = 0;
107-
char cmdline_passed[COMMAND_LINE_SIZE] = { 0, };
107+
char cmdline_passed[COMMAND_LINE_SIZE] __maybe_unused = { 0, };
108108

109109
#if defined(CONFIG_NIOS2_PASS_CMDLINE)
110110
if (r4 == 0x534f494e) { /* r4 is magic NIOS */

0 commit comments

Comments
 (0)