Skip to contentSkip to conversation

Unusued variables

PATCH In review Carles Pina i Estany 2 participants 2 messages Sep 24, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Unusued variables

Hello,

This is not my "scope" (I mean, not my code) (so sorry if this was on purpose or a warning in my gcc for some reason, etc.):

Taking a look to the warnings that my gcc generates compiling Grub2 I have seen:
-------
commands/i386/pc/pxecmd.c:49: warning: unused parameter 'argc' commands/i386/pc/pxecmd.c:49: warning: unused parameter 'args' disk/dmraid_nvidia.c:96: warning: unused variable 'uuid'
-------

Attached patch fixes it.

-------
2008-09-24 Carles Pina i Estany <[email protected]>

* disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter' warning.
* commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
-------

Regards,

Signature · 2 lines
Carles Pina i Estany		GPG id: 0x17756391
	http://pinux.info
dmraid_nvidia.c +0 -1
Index: disk/dmraid_nvidia.c
===================================================================
@@ -93,7 +93,6 @@
 {
   grub_disk_addr_t sector;
   struct grub_nv_super sb;
-  grub_uint32_t *uuid;
 
   if (disk->partition)
     return grub_error (GRUB_ERR_OUT_OF_RANGE, "skip partition");
i386/pc/pxecmd.c +2 -1
Index: commands/i386/pc/pxecmd.c
===================================================================
@@ -46,7 +46,8 @@
 }
 
 static grub_err_t
-grub_cmd_pxe (struct grub_arg_list *state, int argc, char **args)
+grub_cmd_pxe (struct grub_arg_list *state, int argc __attribute__ ((unused)),
+	      char **args __attribute__ ((unused)))
 {
   if (! grub_pxe_pxenv)
     return grub_error (GRUB_ERR_FILE_NOT_FOUND, "no pxe environment");
#1 lore raw
Quoted 5 lines · Carles Pina i Estany

Hello,

This is not my "scope" (I mean, not my code) (so sorry if this was on purpose or a warning in my gcc for some reason, etc.):

Such janitor work is very welcome! Feel free to cleanup things anytime ;-)

Quoted 5 lines

2008-09-24 Carles Pina i Estany <[email protected]>

* disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter' warning.
* commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.

Committed, thanks.

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."