Looking at documentation (did not tried) : g_slist_free_full(*list, g_free)
?Regards,OlivierEnvoyé depuis mon appareil Galaxy
-------- Message d'origine --------De : Richard Sharpe
<realrichardsha...@gmail.com> Date : 17/03/2021 05:27 (GMT+01:00) À :
Developer support list for Wireshark <wireshark-dev@wireshark.org> Objet :
[Wireshark-dev] Problems with passing g_free to g_slist_foreach? Hi folks,I
have been seeing some compiler errors on CentOS 8 like the
following:-----------------------------------/home/rsharpe/src/<some-path>wireshark/epan/packet.c:142:25:
error:cast between incompatible function types from ‘void (*)(void *)’ to‘void
(*)(void *, void *)’ [-Werror=cast-function-type] g_slist_foreach(*list,
(GFunc)g_free, NULL); ^cc1: all warnings being treated
as errorsmake[2]: ***
[epan/CMakeFiles/epan.dir/build.make:687:epan/CMakeFiles/epan.dir/packet.c.o]
Error 1----------------------------------The warning is correct because a GFunc
takes two arguments, whileg_free takes only one argument.How do I avoid the
warning/error?Also, should we fix these things up?-- Regards,Richard
Sharpe(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)___________________________________________________________________________Sent
via: Wireshark-dev mailing list <wireshark-dev@wireshark.org>Archives:
https://www.wireshark.org/lists/wireshark-devUnsubscribe:
https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives: https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe