diff options
Diffstat (limited to 'libunbound/python/libunbound.i')
-rw-r--r-- | libunbound/python/libunbound.i | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libunbound/python/libunbound.i b/libunbound/python/libunbound.i index 84a536929421..6196a3979c4a 100644 --- a/libunbound/python/libunbound.i +++ b/libunbound/python/libunbound.i @@ -33,12 +33,26 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ +%begin %{ +/* store state of warning output, restored at later pop */ +#pragma GCC diagnostic push +/* ignore gcc8 METH_NOARGS function cast warnings for swig function pointers */ +#pragma GCC diagnostic ignored "-Wcast-function-type" +%} %module unbound %{ +/* restore state of warning output, remove the functioncast ignore */ +#pragma GCC diagnostic pop #include <sys/types.h> + #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> + #endif + #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> + #endif + #ifdef HAVE_ARPA_INET_H #include <arpa/inet.h> + #endif #include "libunbound/unbound.h" %} @@ -108,7 +122,7 @@ %inline %{ void ub_ctx_free_dbg (struct ub_ctx* c) { - printf("******** UB_CTX free 0x%lX ************\n", (long unsigned int)c); + printf("******** UB_CTX free 0x%p ************\n", c); ub_ctx_delete(c); } @@ -648,7 +662,7 @@ Result: ['74.125.43.147', '74.125.43.99', '74.125.43.103', '74.125.43.104'] %inline %{ void ub_resolve_free_dbg (struct ub_result* r) { - printf("******** UB_RESOLVE free 0x%lX ************\n", (long unsigned int)r); + printf("******** UB_RESOLVE free 0x%p ************\n", r); ub_resolve_free(r); } %} |