On Sun, Sep 20, 2009 at 5:39 AM, Robert Millan <r...@aybabtu.com> wrote:
>
> Maybe there's some subtle detail I'm missing, but it seems to me that it's
> completely pointless to pass the `name' parameter in all calls to these
> two functions:
>
>  static inline void
>  grub_term_register_input (const char *name __attribute__ ((unused)),
>                          grub_term_input_t term)
>  {
>   grub_handler_register (&grub_term_input_class, GRUB_AS_HANDLER (term));
>  }
>
>  static inline void
>  grub_term_register_output (const char *name __attribute__ ((unused)),
>                           grub_term_output_t term)
>  {
>   grub_handler_register (&grub_term_output_class, GRUB_AS_HANDLER (term));
>  }
>
> Such as:
>
>  void
>  grub_console_init (void)
>  {
>    grub_term_register_output ("console", &grub_console_term_output);
>    grub_term_register_input ("console", &grub_console_term_input);
>  }
>
> Since we don't use it, and the same information is in term->name anyway.
>
> Does anyone see a reason not to simplify this?

Hi,

This is used to generate handler.lst automatically, and as name is
marked as unused, it won't generate extra code.

-- 
Bean

gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to