Similar to the previous "configure.ac: fix grpc build" commit:
Google bumped it's compiler requirements again [1], hence the c++ version needs to be adjusted to c++17 to be able to build with the latest grpc versions.
[1] a5e3ed43d4/foundational-cxx-support-matrix.md
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
ATTRIBUTE_UNUSED seems to be never was a public part of the libvirt interface
and leads to the following issue with recent libvirt versions were
ATTRIBUTE_UNUSED has been renamed to G_GNUC_UNUSED:
src/virt.c:2209:49: error: expected ';', ',' or ')' before 'ATTRIBUTE_UNUSED'
2209 | static void virt_eventloop_timeout_cb(int timer ATTRIBUTE_UNUSED,
| ^~~~~~~~~~~~~~~~
src/virt.c: In function 'register_event_impl':
src/virt.c:2222:26: error: 'virt_eventloop_timeout_cb' undeclared (first use in this function)
2222 | virt_eventloop_timeout_cb, NULL, NULL) < 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
src/virt.c:2222:26: note: each undeclared identifier is reported only once for each function it appears in
Drop ATTRIBUTE_UNUSED here as there is little use from it.
Update link status only if rte_eth_link_get_nowait return success
otherwise link may not be filled properly.
This also fixes the following build issue with up-to-date gcc version:
src/dpdkevents.c: In function 'dpdk_helper_link_status_get':
src/dpdkevents.c:439:7: error: ignoring return value of 'rte_eth_link_get_nowait' declared with attribute 'warn_unused_result' [-Werror=unused-result]
439 | rte_eth_link_get_nowait(i, &link);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
The builds are failing due to error like:
src/curl.c:349:3: error: call to '_curl_easy_setopt_err_long' declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
349 | curl_easy_setopt(wp->curl, CURLOPT_IPRESOLVE, wp->address_family);
src/curl_xml.c:740:3: error: call to '_curl_easy_setopt_err_long' declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
740 | curl_easy_setopt(db->curl, CURLOPT_IPRESOLVE, db->address_family);
src/curl_json.c:586:3: error: call to '_curl_easy_setopt_err_long' declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
586 | curl_easy_setopt(db->curl, CURLOPT_IPRESOLVE, db->address_family);
The error were seen during a rebuild in Ubuntu.
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Static analyzer detected (write_syslog.c:562):
- Memory allocated for `cb` via `calloc()` was lost when returning -1
due to invalid config options (before line 594)
Root cause:
- The function `ws_config_tsd()` could return early on config errors
without freeing `cb`, while successful path used `user_data.free_func`
for cleanup.
Fix:
- Added explicit cleanup with `ws_callback_free(cb)` before all error returns
- Only one error return path needed fixing (invalid option case)
- Success path still uses automatic cleanup via `user_data.free_func`
Impact:
- Fixes memory leak that could occur on every invalid configuration
- No behavioral changes for valid configurations
- Maintains existing cleanup strategy
Triggers found by static analyzer Svace.
Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
libgcrypt has provided a .pc file since 2018, and as of 2024 it no
longer provides a libgcrypt-config program by default, so the existing
test won't find the library any more.
* luaC_pushoconfigitem (indirectly lua_config)
* luaC_pushnotification
In the previous versions, there was no test code for Lua plugin.
Thus this is first step to improve such a situation.
Signed-off-by: Kentaro Hayashi <kenhys@gmail.com>