You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recent updates to compiler versions unearth the following warnings:
http_server.c
warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
aio.c
runtime error: call to function nni_aio_free through pointer to incorrect function type 'void (*)(void *)'
UndefinedBehaviorSanitizer: undefined-behavior
Describe the bug
Recent updates to compiler versions unearth the following warnings:
http_server.c
warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
aio.c
runtime error: call to function nni_aio_free through pointer to incorrect function type 'void (*)(void *)'
UndefinedBehaviorSanitizer: undefined-behavior
Solution
(1) You've already fixed in main, would be great to port this to stable.
(2) The cast of
nni_aio_free()
to typenni_cb
is technically UB here: https://github.com/nanomsg/nng/blob/main/src/core/aio.c#L77I will provide a PR for both of the above.
** Environment Details **
The text was updated successfully, but these errors were encountered: