diff options
author | Donald Sharp <sharpd@nvidia.com> | 2021-01-24 14:00:43 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2021-01-25 15:15:36 +0100 |
commit | ea6caa1f523a355cc95a1c73432e595f5ef4ec46 (patch) | |
tree | 4fd5e98f7f8e0943a15a16675009edc91c1df568 /lib/frrscript.c | |
parent | lib: Prevent possible memory overwrite (diff) | |
download | frr-ea6caa1f523a355cc95a1c73432e595f5ef4ec46.tar.xz frr-ea6caa1f523a355cc95a1c73432e595f5ef4ec46.zip |
lib: Wrapper a function to make gcc-10 happy
gcc-10 is complaining:
lib/frrscript.c:42:14: error: cast between incompatible function types from ‘const char * (*)(lua_State *, const char *)’ to ‘void (*)(lua_State *, const void *)’ [-Werror=cast-function-type]
42 | .encoder = (encoder_func)lua_pushstring,
| ^
Wrapper it to make it happy. Not sure what else to do.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/frrscript.c')
-rw-r--r-- | lib/frrscript.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/frrscript.c b/lib/frrscript.c index a43f389f9..10d400886 100644 --- a/lib/frrscript.c +++ b/lib/frrscript.c @@ -39,7 +39,7 @@ struct frrscript_codec frrscript_codecs_lib[] = { .encoder = (encoder_func)lua_pushintegerp, .decoder = lua_tointegerp}, {.typename = "string", - .encoder = (encoder_func)lua_pushstring, + .encoder = (encoder_func)lua_pushstring_wrapper, .decoder = lua_tostringp}, {.typename = "prefix", .encoder = (encoder_func)lua_pushprefix, |