This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size_t uv_handle_size(uv_handle_type type) { | |
switch (type) { | |
#define XX(uc, lc) case UV_##uc: return sizeof(uv_##lc##_t); | |
UV_HANDLE_TYPE_MAP(XX) | |
#undef XX | |
} | |
} | |
size_t uv_req_size(uv_req_type type) { | |
switch(type) { | |
#define XX(uc, lc) case UV_##uc: return sizeof(uv_##lc##_t); | |
UV_REQ_TYPE_MAP(XX) | |
#undef XX | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc --std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter -Iinclude -Iinclude/uv-private -Isrc/unix/ev -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE=1 -Isrc/ares/config_darwin -g -c src/uv-common.c -o src/uv-common.o | |
src/uv-common.c:38:24: error: use of undeclared identifier 'uv_ares_event_t'; did you mean 'uv_fs_event_t'? | |
UV_HANDLE_TYPE_MAP(XX) | |
^ | |
include/uv.h:136:3: note: expanded from macro 'UV_HANDLE_TYPE_MAP' | |
XX(ARES_EVENT, ares_event) \ | |
^ | |
src/uv-common.c:37:48: note: expanded from macro 'XX' | |
#define XX(uc, lc) case UV_##uc: return sizeof(uv_##lc##_t); | |
^ | |
<scratch space>:14:1: note: expanded from macro 'uv_' | |
uv_ares_event_t | |
^ | |
src/uv-common.c:38:24: error: use of undeclared identifier 'uv_file_t' | |
UV_HANDLE_TYPE_MAP(XX) | |
^ | |
include/uv.h:140:3: note: expanded from macro 'UV_HANDLE_TYPE_MAP' | |
XX(FILE, file) \ | |
^ | |
src/uv-common.c:37:48: note: expanded from macro 'XX' | |
#define XX(uc, lc) case UV_##uc: return sizeof(uv_##lc##_t); | |
^ | |
<scratch space>:14:1: note: expanded from macro 'uv_' | |
uv_file_t | |
^ | |
src/uv-common.c:36:11: warning: enumeration values 'UV_UNKNOWN_HANDLE' and 'UV_HANDLE_TYPE_MAX' not handled in switch [-Wswitch-enum] | |
switch (type) { | |
^ | |
src/uv-common.c:46:21: error: use of undeclared identifier 'uv_accept_t'; did you mean 'uv_accept'? | |
UV_REQ_TYPE_MAP(XX) | |
^ | |
include/uv.h:153:3: note: expanded from macro 'UV_REQ_TYPE_MAP' | |
XX(ACCEPT, accept) \ | |
^ | |
src/uv-common.c:45:48: note: expanded from macro 'XX' | |
#define XX(uc, lc) case UV_##uc: return sizeof(uv_##lc##_t); | |
^ | |
<scratch space>:14:1: note: expanded from macro 'uv_' | |
uv_accept_t | |
^ | |
include/uv.h:476:15: note: 'uv_accept' declared here | |
UV_EXTERN int uv_accept(uv_stream_t* server, uv_stream_t* client); | |
^ | |
src/uv-common.c:46:21: warning: invalid application of 'sizeof' to a function type [-pedantic,-Wpointer-arith] | |
UV_REQ_TYPE_MAP(XX) | |
~~~~~~~~~~~~~~~~^~~ | |
include/uv.h:153:3: note: expanded from macro 'UV_REQ_TYPE_MAP' | |
XX(ACCEPT, accept) \ | |
^ | |
src/uv-common.c:45:47: note: expanded from macro 'XX' | |
#define XX(uc, lc) case UV_##uc: return sizeof(uv_##lc##_t); | |
^~~~~~~~~~~~~ | |
src/uv-common.c:46:21: error: use of undeclared identifier 'uv_read_t' | |
UV_REQ_TYPE_MAP(XX) | |
^ | |
include/uv.h:154:3: note: expanded from macro 'UV_REQ_TYPE_MAP' | |
XX(READ, read) \ | |
^ | |
src/uv-common.c:45:48: note: expanded from macro 'XX' | |
#define XX(uc, lc) case UV_##uc: return sizeof(uv_##lc##_t); | |
^ | |
<scratch space>:14:1: note: expanded from macro 'uv_' | |
uv_read_t | |
^ | |
src/uv-common.c:46:21: error: use of undeclared identifier 'uv_wakeup_t' | |
UV_REQ_TYPE_MAP(XX) | |
^ | |
include/uv.h:157:3: note: expanded from macro 'UV_REQ_TYPE_MAP' | |
XX(WAKEUP, wakeup) \ | |
^ | |
src/uv-common.c:45:48: note: expanded from macro 'XX' | |
#define XX(uc, lc) case UV_##uc: return sizeof(uv_##lc##_t); | |
^ | |
<scratch space>:14:1: note: expanded from macro 'uv_' | |
uv_wakeup_t | |
^ | |
src/uv-common.c:44:10: warning: enumeration values 'UV_UNKNOWN_REQ', 'UV_REQ_TYPE_PRIVATE', and 'UV_REQ_TYPE_MAX' not handled in switch | |
[-Wswitch-enum] | |
switch(type) { | |
^ | |
3 warnings and 5 errors generated. | |
make: *** [src/uv-common.o] Error 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment