mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-02-09 03:11:07 +01:00
BUILD/MINOR: lua: fix a harmless build warning
Dmitry Sivachenko reported the following build warning using Clang,
though it's harmless :
src/hlua.c:1911:13: warning: variable '_socket_info_expanded_form' is not needed
and will not be emitted [-Wunneeded-internal-declaration]
static char _socket_info_expanded_form[] = SOCKET_INFO_EXPANDED_FORM;
^
Indeed, the variable is not used except to compute a sizeof which is
taken from the string it is initialized from. It probably is a leftover
after various code refactorings. Let's get rid of it now since it's not
used anymore.
No backport is needed.
This commit is contained in:
parent
745d412758
commit
22b0a68120
@ -1907,9 +1907,7 @@ static int hlua_socket_send(struct lua_State *L)
|
||||
return MAY_LJMP(hlua_socket_write_yield(L, 0, 0));
|
||||
}
|
||||
|
||||
#define SOCKET_INFO_EXPANDED_FORM "[0000:0000:0000:0000:0000:0000:0000:0000]:12345"
|
||||
static char _socket_info_expanded_form[] = SOCKET_INFO_EXPANDED_FORM;
|
||||
#define SOCKET_INFO_MAX_LEN (sizeof(_socket_info_expanded_form))
|
||||
#define SOCKET_INFO_MAX_LEN sizeof("[0000:0000:0000:0000:0000:0000:0000:0000]:12345")
|
||||
__LJMP static inline int hlua_socket_info(struct lua_State *L, struct sockaddr_storage *addr)
|
||||
{
|
||||
static char buffer[SOCKET_INFO_MAX_LEN];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user