Details
Description
clang on macOS complains about the lack of override markings for virtual override methods, one such example (of many):
/Users/dgosselin/10.5/server/sql/../storage/myisam/ha_myisam.h:163:7: warning: 'multi_range_read_next' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
|
int multi_range_read_next(range_id_t *range_info);
|
Attachments
Issue Links
- relates to
-
MDEV-34185 macOS Build & Test
-
- Open
-
Activity
Assignee | Dave Gosselin [ JIRAUSER52216 ] |
Issue Type | Task [ 3 ] | Bug [ 1 ] |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] |
Affects Version/s | 10.5 [ 23123 ] |
Comment | [ My clang also complains, I just build with {{-Wno-inconsistent-missing-override}} ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Dave Gosselin [ JIRAUSER52216 ] | Marko Mäkelä [ marko ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Dave Gosselin [ JIRAUSER52216 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Dave Gosselin [ JIRAUSER52216 ] | Marko Mäkelä [ marko ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Dave Gosselin [ JIRAUSER52216 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Dave Gosselin [ JIRAUSER52216 ] | Marko Mäkelä [ marko ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Dave Gosselin [ JIRAUSER52216 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Component/s | Compiling [ 11001 ] | |
Fix Version/s | 10.5.26 [ 29832 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Fix Version/s | 10.6.19 [ 29833 ] | |
Fix Version/s | 10.11.9 [ 29834 ] | |
Fix Version/s | 11.1.6 [ 29835 ] | |
Fix Version/s | 11.2.5 [ 29836 ] | |
Fix Version/s | 11.4.3 [ 29837 ] |
In plain clang, if you add -Wsuggest-override to CMAKE_CXX_FLAGS, it will catch these. I tested with clang-16:
10.5 a13e521bc51d3ad9bb6e8e6481a0c8dea3b648a7
/mariadb/10.5/plugin/handler_socket/libhsclient/hstcpcli.cpp:30:16: error: 'close' overrides a member function but is not marked 'override' [-Werror,-Wsuggest-override]
virtual void close();
^
/mariadb/10.5/plugin/handler_socket/libhsclient/hstcpcli.hpp:37:16: note: overridden virtual function is here
virtual void close() = 0;
^
I think that once this has been fixed, we should add -Wsuggest-override to the flags, so that the mandatory MemorySanitizer builder will prevent these errors.
The -Winconsistent-missing-override is already enabled by default, but it is sloppier in the plain clang.