URL:
  <http://gna.org/bugs/?9525>

                 Summary: Shouldn't use -Wno-unused-parameter
                 Project: Wormux
            Submitted by: snark_boojum
            Submitted on: lundi 16.07.2007 à 20:36
                Category: Compilation
                Severity: 1 - Wish
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 0.8beta1
         Discussion Lock: Any

    _______________________________________________________

Details:

There are several ways you can still allow the warning/error to catch a
function which forgets something, but not be annoyed if said function really
doesn't need the parameter.

In C++, you can just give the typename, then no name. This works, but is
sometimes considered ugly, since the parameter name makes it possible to add
a semantic meaning. So often people do typename /*parameterName*/.

This fails in C, but in this case, just give the parameter its name, and use
(void)my_parameter; in the function.

The attached patch removes the -Wno-unused-parameter switch, and fixes quite
a few unused parameters. Some may still lurk in #ifdef'ed sections...



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: lundi 16.07.2007 à 20:36  Name: wormux-unused.patch  Size: 28 ko   By:
snark_boojum

<http://gna.org/bugs/download.php?file_id=2588>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?9525>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


_______________________________________________
Wormux-gna mailing list
[email protected]
https://mail.gna.org/listinfo/wormux-gna

Reply via email to