summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2020-07-02 18:52:22 +0200
committerGitHub <noreply@github.com>2020-07-02 18:52:22 +0200
commit8ec80e48bb5a6ec08283b20571e0070716e2d1eb (patch)
treea5fa8f5e68c591b3e926622230dc4525e1c4182c
parent9f95d43b6708b5760a6854c18c043e58f1c3ff83 (diff)
parent6555d3f587e485afb1676948d7a5868afac3aee8 (diff)
Merge pull request #4196 from neheb/gcc10
move nixio__bin2hex to header and make static
-rw-r--r--libs/luci-lib-nixio/src/address.c2
-rw-r--r--libs/luci-lib-nixio/src/binary.c4
-rw-r--r--libs/luci-lib-nixio/src/nixio.h4
3 files changed, 4 insertions, 6 deletions
diff --git a/libs/luci-lib-nixio/src/address.c b/libs/luci-lib-nixio/src/address.c
index 0bf53caf82..6ed3e5c0e9 100644
--- a/libs/luci-lib-nixio/src/address.c
+++ b/libs/luci-lib-nixio/src/address.c
@@ -153,7 +153,7 @@ int nixio__addr_write(nixio_addr *addr, struct sockaddr *saddr) {
/**
* netmask to prefix helper
*/
-int nixio__addr_prefix(struct sockaddr *saddr) {
+static int nixio__addr_prefix(struct sockaddr *saddr) {
int prefix = 0;
size_t len;
uint8_t *addr;
diff --git a/libs/luci-lib-nixio/src/binary.c b/libs/luci-lib-nixio/src/binary.c
index da794536ce..56f6d1e2f6 100644
--- a/libs/luci-lib-nixio/src/binary.c
+++ b/libs/luci-lib-nixio/src/binary.c
@@ -19,10 +19,6 @@
#include "nixio.h"
#include <stdlib.h>
-const char nixio__bin2hex[16] = {
-'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
-};
-
static unsigned char nixio__b64encode_tbl[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
diff --git a/libs/luci-lib-nixio/src/nixio.h b/libs/luci-lib-nixio/src/nixio.h
index 5eb84d11ae..25874eb04f 100644
--- a/libs/luci-lib-nixio/src/nixio.h
+++ b/libs/luci-lib-nixio/src/nixio.h
@@ -107,7 +107,9 @@ int nixio__mode_write(int mode, char *modestr);
int nixio__push_stat(lua_State *L, nixio_stat_t *buf);
-const char nixio__bin2hex[16];
+static const char nixio__bin2hex[16] = {
+'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
+};
/* Module functions */
void nixio_open_file(lua_State *L);