Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #8563

Re: Not used parameter: how to disable the warning

From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c
Subject Re: Not used parameter: how to disable the warning
Date 2011-07-22 15:15 +1200
Message-ID <98s8b5FroiU10@mid.individual.net> (permalink)
References <j0a9jt$7f0$1@nnrp.ngi.it> <r.thered-936ADA.20084521072011@free.teranews.com>

Show all headers | View raw


On 07/22/11 03:08 PM, rudolf wrote:
> In article<j0a9jt$7f0$1@nnrp.ngi.it>, pozz<pozzugno@gmail.com>  wrote:
>
>> Is there a universal method (valid for all C compilers) that avoids the
>> compiler to generate a warning about a not used parameter of a function?
>
> Yes, there is.  Modify the function so that it takes only the parameters
> it uses.

That isn't always possible, especially where the function is used as a 
callback or anywhere else a function address is assigned to a function 
pointer.

-- 
Ian Collins

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Not used parameter: how to disable the warning pozz <pozzugno@gmail.com> - 2011-07-22 00:35 +0200
  Re: Not used parameter: how to disable the warning Ian Collins <ian-news@hotmail.com> - 2011-07-22 10:47 +1200
    Re: Not used parameter: how to disable the warning "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-07-22 02:13 -0700
    Re: Not used parameter: how to disable the warning Kenneth Brody <kenbrody@spamcop.net> - 2011-07-22 12:04 -0400
      Re: Not used parameter: how to disable the warning Ian Collins <ian-news@hotmail.com> - 2011-07-23 09:34 +1200
  Re: Not used parameter: how to disable the warning Harald van Dijk <truedfx@gmail.com> - 2011-07-21 16:06 -0700
  Re: Not used parameter: how to disable the warning pete <pfiland@mindspring.com> - 2011-07-21 20:49 -0400
  Re: Not used parameter: how to disable the warning Geoff <geoff@invalid.invalid> - 2011-07-21 17:52 -0700
  Re: Not used parameter: how to disable the warning Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-07-21 20:52 -0400
  Re: Not used parameter: how to disable the warning Seebs <usenet-nospam@seebs.net> - 2011-07-22 02:51 +0000
  Re: Not used parameter: how to disable the warning rudolf <r.thered@gmail.com> - 2011-07-21 20:08 -0700
    Re: Not used parameter: how to disable the warning Ian Collins <ian-news@hotmail.com> - 2011-07-22 15:15 +1200
  Re: Not used parameter: how to disable the warning Ralf Damaschke <rwspam@gmx.de> - 2011-07-22 09:01 +0000
  Re: Not used parameter: how to disable the warning Roberto Waltman <usenet@rwaltman.com> - 2011-07-22 17:56 -0400

csiph-web