Avoid "defined but not used" for consts

This commit is contained in:
Nigel Tao committed 2019-02-02 13:34:50 +11:00
1 parent 11a6819be9
commit 70958ea914
6 files changed
+991 -895

No files matched your search

@@ -14,8 +14,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#define WUFFS_BASE__IGNORE_POTENTIALLY_UNUSED_VARIABLE(x) (void)(x)
static inline void wuffs_base__ignore_check_wuffs_version_status(
wuffs_base__status z) {}
@@ -59,8 +59,10 @@
// Clang also defines "__GNUC__".
#if defined(__GNUC__)
#define WUFFS_BASE__POTENTIALLY_UNUSED __attribute__((unused))
#define WUFFS_BASE__WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
#define WUFFS_BASE__POTENTIALLY_UNUSED
#define WUFFS_BASE__WARN_UNUSED_RESULT
#endif