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

Commit

Permalink
unix: fix clang -Wlanguage-extension-token warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Aug 31, 2012
1 parent 5eb1d19 commit ff0a93a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/unix/async.c
Expand Up @@ -31,7 +31,7 @@ static void uv__async_io(uv_loop_t* loop, uv__io_t* handle, int events);


__attribute__((always_inline))

This comment has been minimized.

Copy link
@dvv

dvv Oct 14, 2012

Contributor

GCC 4.7.2, archlinux 64-bit, Linux profit 3.5.4-1-ARCH #1 SMP PREEMPT Sat Sep 15 08:12:04 CEST 2012 x86_64 GNU/Linux:

/home/dvv/projects/LUA/luv/src/uv/src/unix/linux/../internal.h:105:13: warning: always_inline function might not be inlinable [-Wattributes]

removing this line makes compile clean. can we somehow guard this, for i'd like to build with -Werror turned on.
tia

This comment has been minimized.

Copy link
@bnoordhuis

bnoordhuis Oct 14, 2012

Author Contributor

Removed in fd136da.

inline static int uv__async_make_pending(volatile sig_atomic_t* ptr) {
static int uv__async_make_pending(volatile sig_atomic_t* ptr) {
/* Do a cheap read first. */
if (*ptr)
return 1;
Expand Down
11 changes: 4 additions & 7 deletions src/unix/internal.h
Expand Up @@ -31,13 +31,10 @@
#if defined(__GNUC__)
# define __read_mostly __attribute__((__section__(".data.read_mostly")))
#else
# define __attribute__(v)
# define __read_mostly
#endif

#if defined(__STRICT_ANSI__)
# define inline __inline
#endif

#undef HAVE_FUTIMES
#undef HAVE_KQUEUE
#undef HAVE_PORTS_FS
Expand Down Expand Up @@ -108,9 +105,9 @@ enum {
UV_LOOP_EIO_INITIALIZED = 1
};

inline static void uv__req_init(uv_loop_t* loop,
uv_req_t* req,
uv_req_type type) {
__attribute__((unused))
__attribute__((always_inline))
static void uv__req_init(uv_loop_t* loop, uv_req_t* req, uv_req_type type) {
req->type = type;
uv__req_register(loop, req);
}
Expand Down

0 comments on commit ff0a93a

Please sign in to comment.