From 8639c43e3a75b8eb1b525db4eb4848cf851f4f92 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 11 Apr 2023 15:10:07 +0200 Subject: Fix compiler warning if user code is compiled with '-Wextra' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes two similar warnings: "cast between incompatible function types from ‘void (*)(Fl_Widget*)’ to ‘void (*)(Fl_Widget*, void*)’ [-Wcast-function-type]" --- FL/Fl_Widget.H | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index 969aee6fa..4b2320468 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -652,7 +652,7 @@ public: Each widget has a single callback. \param[in] cb new callback */ - void callback(Fl_Callback0* cb) {callback_ = (Fl_Callback*)cb;} + void callback(Fl_Callback0* cb) {callback_ = (Fl_Callback*)(void*)cb;} /** Sets the current callback function for the widget. Each widget has a single callback. @@ -660,7 +660,7 @@ public: \param[in] p user data */ void callback(Fl_Callback1* cb, long p = 0) { - callback_ = (Fl_Callback*)cb; + callback_ = (Fl_Callback*)(void *)cb; user_data_ = (void*)(fl_intptr_t)p; } -- cgit v1.2.3