From da1fffaa093d2541f7374a7aaf16d2f00ed29ddc Mon Sep 17 00:00:00 2001 From: Antonin ENFRUN Date: Mon, 12 May 2014 00:21:50 +0200 Subject: Fix some unused variables, and silence a clang warning about initialization override in vmentrytable.h --- unix/modsocket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unix/modsocket.c') diff --git a/unix/modsocket.c b/unix/modsocket.c index 72aee95eab..131d9285e4 100644 --- a/unix/modsocket.c +++ b/unix/modsocket.c @@ -291,6 +291,7 @@ STATIC const mp_obj_type_t microsocket_type = { .locals_dict = (mp_obj_t)µsocket_locals_dict, }; +#if MICROPY_SOCKET_EXTRA STATIC mp_obj_t mod_socket_htons(mp_obj_t arg) { return MP_OBJ_NEW_SMALL_INT((machine_int_t)htons(MP_OBJ_SMALL_INT_VALUE(arg))); } @@ -308,7 +309,6 @@ STATIC mp_obj_t mod_socket_inet_aton(mp_obj_t arg) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_socket_inet_aton_obj, mod_socket_inet_aton); -#if MICROPY_SOCKET_EXTRA STATIC mp_obj_t mod_socket_gethostbyname(mp_obj_t arg) { assert(MP_OBJ_IS_TYPE(arg, &mp_type_str)); const char *s = mp_obj_str_get_str(arg); @@ -321,7 +321,7 @@ STATIC mp_obj_t mod_socket_gethostbyname(mp_obj_t arg) { return mp_obj_new_int(*(int*)*h->h_addr_list); } STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_socket_gethostbyname_obj, mod_socket_gethostbyname); -#endif +#endif // MICROPY_SOCKET_EXTRA STATIC mp_obj_t mod_socket_getaddrinfo(uint n_args, const mp_obj_t *args) { // TODO: Implement all args -- cgit v1.2.3