Board index » cppbuilder » #pragma argsused ???

#pragma argsused ???


2003-07-18 06:11:16 PM
cppbuilder35
Hi All,
Thanks, in advance.
Could someone translate the following into English?
TAC
Syntax
#pragma argsused
Description
The argsused pragma is allowed only between function definitions, and it
affects only the next function. It disables the warning message:
"Parameter name is never used in function func-name"
 
 

Re:#pragma argsused ???

The following will generate a warning that the parameter abc is not used:
-----------------------
int FuncName(int abc)
{
return 3;
}
-----------------------
The following will not generate the warning:
-----------------------
#pragma argsused
int FuncName(int abc)
{
return 3;
}
-----------------------
The effect of the pragma extends only to the one function which follows it.
If other functions need it then each would need its own #pragma argsused
line.
. Ed
Quote
Terry A Cloud wrote in message
news:3f18473f$ XXXX@XXXXX.COM ...
Hi All,
Thanks, in advance.
Could someone translate the following into English?
TAC

Syntax

#pragma argsused

Description

The argsused pragma is allowed only between function
definitions, and it affects only the next function. It
disables the warning message:

"Parameter name is never used in function func-name"
 

Re:#pragma argsused ???

On Fri, 18 Jul 2003 03:11:16 -0700, "Terry A Cloud" < XXXX@XXXXX.COM >
wrote:
Quote
The argsused pragma is allowed only between function definitions, and it
affects only the next function. It disables the warning message:

"Parameter name is never used in function func-name"
If you define a function that ignores a param, and don't
want the warning, you can put the pragma before the
function body to turn the warning off. You might want
to do something like that if you are refining the function
and will eventually use all the params in the parameter
list. Or, you might have a param in the list as a place
holder for some future argument like MS likes to do
in their API calls. The pragma prevents the compiler
issuing a warning.
See the Windows API help files for functions that
have "reserved.. must be NULL" or something
like that in the parameter list to see what I mean.
--
"I don't want to belong to any club that would have me as a member."
-- Groucho Marx
 

{smallsort}