Bug #87336 "overrides a member function but is not marked 'override'" warnings in 8.0.2
Submitted: 7 Aug 2017 7:04 Modified: 8 Aug 2017 12:59
Reporter: Alexey Kopytov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.2 OS:Any
Assigned to: CPU Architecture:Any

[7 Aug 2017 7:04] Alexey Kopytov
Description:
I get a bunch of annoying warnings when building 8.0.2 with Clang (Apple
LLVM version 8.1.0 (clang-802.0.42)) on macOS:

In file included from /Users/kaa/src/git/mysql-server/unittest/gunit/unique-t.cc:24:
In file included from /Users/kaa/src/git/mysql-server/sql/sql_class.h:47:
/Users/kaa/src/git/mysql-server/sql/item.h:4714:26: warning: 'save_in_field_inner' overrides a member function but is not marked 'override'
      [-Winconsistent-missing-override]
  type_conversion_status save_in_field_inner(Field *to, bool no_conversions);
                         ^
/Users/kaa/src/git/mysql-server/sql/item.h:4490:26: note: overridden virtual function is here
  type_conversion_status save_in_field_inner(Field *field, bool no_conversions)
                         ^
In file included from /Users/kaa/src/git/mysql-server/unittest/gunit/unique-t.cc:24:
In file included from /Users/kaa/src/git/mysql-server/sql/sql_class.h:88:
/Users/kaa/src/git/mysql-server/sql/sql_admin.h:80:8: warning: 'execute' overrides a member function but is not marked 'override'
      [-Winconsistent-missing-override]
  bool execute(THD *thd);
       ^
/Users/kaa/src/git/mysql-server/sql/sql_cmd.h:90:16: note: overridden virtual function is here
  virtual bool execute(THD *thd) = 0;

How to repeat:
Build 8.0.2 with Clang.
[7 Aug 2017 9:05] MySQL Verification Team
Hello Alexey,

Thank you for the report and feedback.

Thanks,
Umesh
[8 Aug 2017 12:04] Tor Didriksen
Posted by developer:
 
Fixed by:
commit ab7d89959145e783bbc8d0590382c9ec71756f34
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Jun 7 13:27:40 2017 +0200

    Fix two missing override attributes.
    
    Silences a bunch of Clang warnings.
    
    Change-Id: Ibb0ba390b14f0c84b8481c82110e5f982ba52ca5
[8 Aug 2017 12:07] Alexey Kopytov
Thanks for the update, Tor!
[8 Aug 2017 12:59] Paul DuBois
Posted by developer:
 
Fixed in 8.0.3.

Code cleanup. No changelog entry needed.