Silence warning when casting to FRT_METOD_PT.
@@ -12,5 +12,22 @@ public:
typedef void (FRT_Invokable::*FRT_METHOD_PT)(FRT_RPCRequest *);
-#define FRT_METHOD(pt) ((FRT_METHOD_PT) &pt)
+namespace fnet::internal {
+
+template <class T>
+using frt_method_precast_pt = void (T::*)(FRT_RPCRequest *);
+
+template <class T>
+FRT_METHOD_PT
+frt_method_pt_cast(frt_method_precast_pt<T> pt)
+{
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshift-negative-value"
+ return (FRT_METHOD_PT) pt;
+#pragma GCC diagnostic pop
+}
+
+}
+
+#define FRT_METHOD(pt) (fnet::internal::frt_method_pt_cast(&pt))
