[MDEV-13040] mariadb_stmt.h contains C++ comments for MYSQL_STMT_USE_RESULT Created: 2017-06-08  Updated: 2017-06-08  Resolved: 2017-06-08

Status: Closed
Project: MariaDB Server
Component/s: libmariadb
Affects Version/s: 10.2.6
Fix Version/s: 10.2.7

Type: Bug Priority: Critical
Reporter: FLAESCH Sebastien Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux Debian 8.6



 Description   

The mariadb_stmt.h header contains C++ comments:

typedef enum mysql_stmt_state
{
  MYSQL_STMT_INITTED = 0,
  MYSQL_STMT_PREPARED,
  MYSQL_STMT_EXECUTED,
//  MYSQL_STMT_USE_RESULT,
//  MYSQL_STMT_STORE_RESULT,
   ...

When compiling with gcc C compiler and -Wall -Werrors you get:

In file included from /opt3/dbs/mdb/10.2/include/mysql/mysql.h:421:0,
                 from mys.c:42:
/opt3/dbs/mdb/10.2/include/mysql/mariadb_stmt.h:92:1: error: C++ style comments are not allowed in ISO C90 [-Werror]
 //  MYSQL_STMT_USE_RESULT,
 ^
/opt3/dbs/mdb/10.2/include/mysql/mariadb_stmt.h:92:1: error: (this will be reported only once per input file) [-Werror]
cc1: all warnings being treated as errors

Please consider adding such compilation testing in non-regression tests.



 Comments   
Comment by Georg Richter [ 2017-06-08 ]

Fixed in rev. e5ce85b0b6f2e734b497aea5c2eff6398da749f5 (master and 10.2-server branch of Connector/C)

Generated at Thu Feb 08 08:02:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.