Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.1.2
-
None
-
Alpine Linux
-
2017-39
Description
Hi, I am trying to compile MaxScale on Alpine Linux. During building I get the following errors (excerpt):
/root/MaxScale-maxscale-2.0.5/server/core/buffer.c:738:9: note: in expansion of macro 'MXS_ERROR'
MXS_ERROR("Memory allocation failed due to %s.",
^~~~~~~~~
/root/MaxScale-maxscale-2.0.5/server/core/buffer.c: In function 'gwbuf_add_property':
/root/MaxScale-maxscale-2.0.5/server/core/buffer.c:822:19: error: format '%s' expects argument of type 'char *', but argument 6 has type 'int' [-Werror=format=]
MXS_ERROR("Memory allocation failed due to %s.",
^
/root/MaxScale-maxscale-2.0.5/server/include/log_manager.h:112:61: note: in definition of macro 'MXS_LOG_MESSAGE'
mxs_log_message(priority, _FILE, __LINE, __func, format, ##VA_ARGS_)
^~~~~~
/root/MaxScale-maxscale-2.0.5/server/core/buffer.c:822:9: note: in expansion of macro 'MXS_ERROR'
MXS_ERROR("Memory allocation failed due to %s.",
^~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [server/core/CMakeFiles/maxscale-common.dir/build.make:111: server/core/CMakeFiles/maxscale-common.dir/buffer.c.o] Error 1
I am baffled. strerror_r returns an int, and the format string uses %s. What am I missing here?