Description:
The include guard in sql/sql_alter_instance.h is misspelt. In the "#ifndef" line, it is spelt correctly: SQL_ALTER_INSTANCE_INCLUDED, but in the next line it is spelt SQL_ALTER_INSTNACE_INCLUDED. This prevents it from working as a correct include guard.
Clang SVN outputs the following:
In file included from sql/sql_alter_instance.cc:16:
/sql/sql_alter_instance.h:16:9: warning: 'SQL_ALTER_INSTANCE_INCLUDED' is used as a header guard here, followed by #define of a different macro [-Wheader-guard]
#ifndef SQL_ALTER_INSTANCE_INCLUDED
^~~~~~~~~~~~~~~~~~~~~~~~~~~
sql/sql_alter_instance.h:17:9: note: 'SQL_ALTER_INSTNACE_INCLUDED' is defined here; did you mean 'SQL_ALTER_INSTANCE_INCLUDED'?
#define SQL_ALTER_INSTNACE_INCLUDED
^~~~~~~~~~~~~~~~~~~~~~~~~~~
SQL_ALTER_INSTANCE_INCLUDED
How to repeat:
Look at
https://github.com/mysql/mysql-server/blob/5.7/sql/sql_alter_instance.h#L17
Suggested fix:
Correct the spelling so that the second line matches the first.
Description: The include guard in sql/sql_alter_instance.h is misspelt. In the "#ifndef" line, it is spelt correctly: SQL_ALTER_INSTANCE_INCLUDED, but in the next line it is spelt SQL_ALTER_INSTNACE_INCLUDED. This prevents it from working as a correct include guard. Clang SVN outputs the following: In file included from sql/sql_alter_instance.cc:16: /sql/sql_alter_instance.h:16:9: warning: 'SQL_ALTER_INSTANCE_INCLUDED' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef SQL_ALTER_INSTANCE_INCLUDED ^~~~~~~~~~~~~~~~~~~~~~~~~~~ sql/sql_alter_instance.h:17:9: note: 'SQL_ALTER_INSTNACE_INCLUDED' is defined here; did you mean 'SQL_ALTER_INSTANCE_INCLUDED'? #define SQL_ALTER_INSTNACE_INCLUDED ^~~~~~~~~~~~~~~~~~~~~~~~~~~ SQL_ALTER_INSTANCE_INCLUDED How to repeat: Look at https://github.com/mysql/mysql-server/blob/5.7/sql/sql_alter_instance.h#L17 Suggested fix: Correct the spelling so that the second line matches the first.