Workaround for -Woverloaded-virtual= error

The place to discuss linux version of MakeMKV
Post Reply
darx1
Posts: 3
Joined: Sun Sep 09, 2018 11:38 am

Workaround for -Woverloaded-virtual= error

Post by darx1 »

Not a proper fix, but does allow the compile on Linux with latest gcc.

./libebml/inc/ebml/EbmlElement.h:395:13: warning: 'virtual libebml::EbmlElement::operator const libebml::EbmlId&() const' was hi
dden [-Woverloaded-virtual=]

Code: Select all

--- a/libebml/inc/ebml/EbmlElement.h    2023-05-29 21:06:31.000000000 +0000
+++ b/libebml/inc/ebml/EbmlElement.h    2023-08-12 07:36:54.299866394 +0000
@@ -392,7 +392,10 @@
     */
     virtual EbmlElement * Clone() const = 0;
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Woverloaded-virtual="
     virtual operator const EbmlId &() const = 0;
+#pragma GCC diagnostic pop
 #if defined(EBML_STRICT_API)
         virtual const char *DebugName() const = 0;
         virtual const EbmlSemanticContext &Context() const = 0;
Post Reply