From 399c37273dcf5921c79029906385e4364a53996f Mon Sep 17 00:00:00 2001 From: uz Date: Mon, 19 Oct 2009 17:25:43 +0000 Subject: [PATCH] Mark an unsed parameter as unused. __attribute__ also supported by cc65. git-svn-id: svn://svn.cc65.org/cc65/trunk@4376 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/assertion.c | 5 +++-- src/common/attrib.h | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/common/assertion.c b/src/common/assertion.c index 8d93be430..d854c95f1 100644 --- a/src/common/assertion.c +++ b/src/common/assertion.c @@ -34,6 +34,7 @@ #include "assertion.h" +#include "attrib.h" @@ -43,7 +44,7 @@ -int AssertAtLinkTime (AssertAction A) +int AssertAtLinkTime (AssertAction A attribute ((unused))) /* Return true if this assertion should be evaluated at link time */ { /* Currently all assertions are evaluated at link time */ @@ -54,7 +55,7 @@ int AssertAtLinkTime (AssertAction A) int AssertAtAsmTime (AssertAction A) /* Return true if this assertion should be evaluated at assembly time */ -{ +{ return (A & 0x02U) == 0; } diff --git a/src/common/attrib.h b/src/common/attrib.h index 7ff01a608..cb9d9195c 100644 --- a/src/common/attrib.h +++ b/src/common/attrib.h @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 2000 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 2000-2009, Ullrich von Bassewitz */ +/* Roemerstrasse 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ @@ -44,10 +44,10 @@ -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__CC65__) # define attribute(a) __attribute__(a) #else -# define attribute(a) +# define attribute(a) #endif -- 2.39.5