Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13040

mariadb_stmt.h contains C++ comments for MYSQL_STMT_USE_RESULT

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.2.6
    • 10.2.7
    • libmariadb
    • None
    • 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.

      Attachments

        Activity

          People

            georg Georg Richter
            sebflaesch FLAESCH Sebastien
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.