summaryrefslogtreecommitdiffhomepage
path: root/libs/luci-lib-nixio/src/nixio.h
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-06-21 19:48:54 -0700
committerRosen Penev <rosenp@gmail.com>2020-06-21 19:58:53 -0700
commit6555d3f587e485afb1676948d7a5868afac3aee8 (patch)
treeda70f4769c5fa5e0c6346d8667bc28f41602a86e /libs/luci-lib-nixio/src/nixio.h
parentb39754907ce904747bc03cd5f7b08d682f8fc5e3 (diff)
move nixio__bin2hex to header and make static
This fixes compilation under GCC10. There's no reason for this to be in a C file anyway. Also fixed a -Wmissing-prototypes warning with nixio__addr_prefix. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'libs/luci-lib-nixio/src/nixio.h')
-rw-r--r--libs/luci-lib-nixio/src/nixio.h4
1 files changed, 3 insertions, 1 deletions
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);