libCom: Added macro EPICS_UNUSED to compilerDependencies.h

Stop unnecessary warnings.
This commit is contained in:
Andrew Johnson
2014-02-20 18:05:42 -06:00
parent b24d7c6da6
commit 1a70f1e347
5 changed files with 23 additions and 2 deletions
+10 -1
View File
@@ -15,9 +15,18 @@ EPICS Base 3.15.0.x releases are not intended for use in production systems.</p>
<h2 align="center">Changes between 3.15.0.1 and 3.15.0.2</h2>
<!-- Insert new items immediately below here ... -->
<h3>Added macro EPICS_UNUSED to compilerDependencies.h</h3>
<p>To prevent the compiler from warning about a known-unused variable, mark it
with the macro EPICS_UNUSED. On gcc and clang this will expand to
<tt>__attribute__((unused))</tt> to prevent the warning.</p>
<h3>User specified db substitution file suffix</h3>
<p>Per Dirk Zimoch's suggestion, a user specified db substitution file suffix is now allowed by setting the variable SUBST_SUFFIX in a configuration directory CONFIG_SITE file or in a Makefile before the include $(TOP)/configure/RULES line. The default is SUBST_SUFFIX=.substitutions.</p>
<p>Per Dirk Zimoch's suggestion, a user specified db substitution file suffix is
now allowed by setting the variable SUBST_SUFFIX in a configuration directory
CONFIG_SITE file or in a Makefile before the include $(TOP)/configure/RULES
line. The default for SUBST_SUFFIX is <tt>.substitutions</tt></p>
<h3>NTP Time Provider adjusts to OS tick rate changes</h3>
@@ -45,5 +45,9 @@
*/
#define EPICS_DEPRECATED __attribute__((deprecated))
/*
* Unused marker
*/
#define EPICS_UNUSED __attribute__((unused))
#endif /* ifndef compilerSpecific_h */
@@ -60,5 +60,9 @@
# define EPICS_DEPRECATED __attribute__((deprecated))
#endif
/*
* Unused marker
*/
#define EPICS_UNUSED __attribute__((unused))
#endif /* ifndef compilerSpecific_h */
+3
View File
@@ -58,5 +58,8 @@
#define EPICS_DEPRECATED
#endif
#ifndef EPICS_UNUSED
# define EPICS_UNUSED
#endif
#endif /* ifndef compilerDependencies_h */
+2 -1
View File
@@ -18,6 +18,7 @@
#define INC_epicsAssert_H
#include "shareLib.h"
#include "compilerDependencies.h"
#ifdef __cplusplus
extern "C" {
@@ -48,7 +49,7 @@ epicsShareFunc void epicsAssert (const char *pFile, const unsigned line,
#define STATIC_JOIN2(x, y) x ## y
#define STATIC_ASSERT(expr) \
typedef int STATIC_JOIN(static_assert_failed_at_line_, __LINE__) \
[ (expr) ? 1 : -1 ]
[ (expr) ? 1 : -1 ] EPICS_UNUSED
#ifdef __cplusplus