Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Conditionally define __unused.
Browse files Browse the repository at this point in the history
Fixes compiler warning '"__unused" redefined' on OS X.

Reported by Saúl Ibarra Corretgé.
  • Loading branch information
bnoordhuis committed Mar 30, 2012
1 parent 4360018 commit 1ab8f5a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions include/uv-private/tree.h
Expand Up @@ -26,10 +26,12 @@
#ifndef UV_TREE_H_
#define UV_TREE_H_

#if __GNUC__
# define __unused __attribute__((unused))
#else
# define __unused
#ifndef __unused
# if __GNUC__
# define __unused __attribute__((unused))
# else
# define __unused
# endif
#endif

/*
Expand Down

0 comments on commit 1ab8f5a

Please sign in to comment.