Skip to content

Commit

Permalink
Let's just remove all the UNUSED() macros for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne Davison committed May 8, 2004
1 parent 4135d09 commit a43e21e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion popt/popt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ poptContext poptFreeContext(poptContext con)
}

int poptAddAlias(poptContext con, struct poptAlias alias,
UNUSED(int flags))
/*@unused@*/ int flags)
{
poptItem item = (poptItem) alloca(sizeof(*item));
memset(item, 0, sizeof(*item));
Expand Down
2 changes: 1 addition & 1 deletion popt/poptconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ int poptReadConfigFile(poptContext con, const char * fn)
return 0;
}

int poptReadDefaultConfig(poptContext con, /*@unused@*/ UNUSED(int useEnv))
int poptReadDefaultConfig(poptContext con, /*@unused@*/ int useEnv)
{
char * fn, * home;
int rc;
Expand Down
12 changes: 6 additions & 6 deletions popt/popthelp.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* @param key option(s)
*/
static void displayArgs(poptContext con,
/*@unused@*/ UNUSED(enum poptCallbackReason foo),
/*@unused@*/ enum poptCallbackReason foo,
struct poptOption * key,
/*@unused@*/ UNUSED(const char * arg), /*@unused@*/ UNUSED(void * data))
/*@unused@*/ const char * arg, /*@unused@*/ void * data)
/*@globals fileSystem@*/
/*@modifies fileSystem@*/
{
Expand Down Expand Up @@ -84,7 +84,7 @@ getTableTranslationDomain(/*@null@*/ const struct poptOption *table)
/*@observer@*/ /*@null@*/ static const char *const
getArgDescrip(const struct poptOption * opt,
/*@-paramuse@*/ /* FIX: wazzup? */
/*@null@*/ UNUSED(const char * translation_domain))
/*@null@*/ const char * translation_domain)
/*@=paramuse@*/
/*@*/
{
Expand Down Expand Up @@ -115,7 +115,7 @@ static /*@only@*/ /*@null@*/ char *
singleOptionDefaultValue(int lineLength,
const struct poptOption * opt,
/*@-paramuse@*/ /* FIX: i18n macros disable with lclint */
/*@null@*/ UNUSED(const char * translation_domain))
/*@null@*/ const char * translation_domain)
/*@=paramuse@*/
/*@*/
{
Expand Down Expand Up @@ -475,7 +475,7 @@ static int showHelpIntro(poptContext con, FILE * fp)
return len;
}

void poptPrintHelp(poptContext con, FILE * fp, /*@unused@*/ UNUSED(int flags))
void poptPrintHelp(poptContext con, FILE * fp, /*@unused@*/ int flags)
{
int leftColWidth;

Expand Down Expand Up @@ -634,7 +634,7 @@ static int showShortOptions(const struct poptOption * opt, FILE * fp,
return strlen(s) + 4;
}

void poptPrintUsage(poptContext con, FILE * fp, /*@unused@*/ UNUSED(int flags))
void poptPrintUsage(poptContext con, FILE * fp, /*@unused@*/ int flags)
{
int cursor;

Expand Down
10 changes: 0 additions & 10 deletions popt/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
#include <unistd.h>
#endif

#if !defined(__GNUC__) || defined(APPLE)
/* Apparently the OS X port of gcc gags on __attribute__.
*
* <http://www.opensource.apple.com/bugs/X/gcc/2512150.html> */
#define __attribute__(x)

#endif

#ifdef __NeXT
/* access macros are not declared in non posix mode in unistd.h -
don't try to use posix on NeXTstep 3.3 ! */
Expand Down Expand Up @@ -77,6 +69,4 @@ char *alloca ();
#define xstrdup(_str) strdup(_str)
#endif /* HAVE_MCHECK_H && defined(__GNUC__) */

#define UNUSED(x) x __attribute__((__unused__))

#include "popt.h"

0 comments on commit a43e21e

Please sign in to comment.