Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1228386 > unrolled thread
| Started by | Marek Vasut <marex@denx.de> |
|---|---|
| First post | 2015-09-19 06:50 +0200 |
| Last post | 2015-10-01 10:20 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] nios2: Fix unused variable warning Marek Vasut <marex@denx.de> - 2015-09-19 06:50 +0200
Re: [PATCH] nios2: Fix unused variable warning Tobias Klauser <tklauser@distanz.ch> - 2015-09-22 17:30 +0200
Re: [PATCH] nios2: Fix unused variable warning Ley Foon Tan <lftan@altera.com> - 2015-10-01 10:20 +0200
| From | Marek Vasut <marex@denx.de> |
|---|---|
| Date | 2015-09-19 06:50 +0200 |
| Subject | [PATCH] nios2: Fix unused variable warning |
| Message-ID | <qaig2-7KZ-7@gated-at.bofh.it> |
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>
---
arch/nios2/kernel/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c
index b101a43..a4ff86d 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 */
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Tobias Klauser <tklauser@distanz.ch> |
|---|---|
| Date | 2015-09-22 17:30 +0200 |
| Message-ID | <qbxG3-P2-43@gated-at.bofh.it> |
| In reply to | #1228386 |
On 2015-09-19 at 06:40:51 +0200, Marek Vasut <marex@denx.de> wrote:
> 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>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ley Foon Tan <lftan@altera.com> |
|---|---|
| Date | 2015-10-01 10:20 +0200 |
| Message-ID | <qeHfR-6EV-25@gated-at.bofh.it> |
| In reply to | #1230332 |
On Tue, Sep 22, 2015 at 11:22 PM, Tobias Klauser <tklauser@distanz.ch> wrote:
> On 2015-09-19 at 06:40:51 +0200, Marek Vasut <marex@denx.de> wrote:
>> 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>
>
> Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
> --
Acked-by: Ley Foon Tan <lftan@altera.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web