summaryrefslogtreecommitdiffstats
path: root/arch/nios2/kernel
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-09-30 22:06:46 +0800
committerLey Foon Tan <lftan@altera.com>2015-11-09 10:33:29 +0800
commit4db2196d0c0de110779b1767d956995efefdb915 (patch)
tree157d76a59d44d2ab5741f012dd80c7313bda00c0 /arch/nios2/kernel
parent6a13feb9c82803e2b815eca72fa7a9f5561d7861 (diff)
downloadblackbird-op-linux-4db2196d0c0de110779b1767d956995efefdb915.tar.gz
blackbird-op-linux-4db2196d0c0de110779b1767d956995efefdb915.zip
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>
Diffstat (limited to 'arch/nios2/kernel')
-rw-r--r--arch/nios2/kernel/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c
index b101a43d3c5a..a4ff86d58d5c 100644
--- a/arch/nios2/kernel/setup.c
+++ b/arch/nios2/kernel/setup.c
@@ -104,7 +104,7 @@ asmlinkage void __init nios2_boot_init(unsigned r4, unsigned r5, unsigned r6,
unsigned r7)
{
unsigned dtb_passed = 0;
- char cmdline_passed[COMMAND_LINE_SIZE] = { 0, };
+ char cmdline_passed[COMMAND_LINE_SIZE] __maybe_unused = { 0, };
#if defined(CONFIG_NIOS2_PASS_CMDLINE)
if (r4 == 0x534f494e) { /* r4 is magic NIOS */
OpenPOWER on IntegriCloud