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

[PATCH] move to c99 style for structure members

    Details

      Description

      While getting travis-ci ready I'm testing with gcc and clang.

      clang is a lot more fussy and generates pages of warnings. There is an output limit in travis-ci that these warnings cause to exceed. These warnings overall contribute to about 1/2 the output.

      C99 isn't too much of a leap forward from C89

      patch: https://github.com/MariaDB/server/pull/52

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              danblack Daniel Black added a comment -

              mariadb-10.1 has those definitions in the include file so 10.1 patch here: https://github.com/MariaDB/server/pull/54

              Show
              danblack Daniel Black added a comment - mariadb-10.1 has those definitions in the include file so 10.1 patch here: https://github.com/MariaDB/server/pull/54
              Hide
              jplindst Jan Lindström added a comment -

              Merged pull requests.

              Show
              jplindst Jan Lindström added a comment - Merged pull requests.
              Hide
              jplindst Jan Lindström added a comment -

              Daniel,

              Some of the compiler(s) do not like this: /home/buildbot/buildbot/build/mariadb-10.1.5/storage/xtradb/handler/i_s.cc:348:3: error: expected primary-expression before ‘.’ token

              Show
              jplindst Jan Lindström added a comment - Daniel, Some of the compiler(s) do not like this: /home/buildbot/buildbot/build/mariadb-10.1.5/storage/xtradb/handler/i_s.cc:348:3: error: expected primary-expression before ‘.’ token
              Hide
              danblack Daniel Black added a comment -

              which ones/versions?

              Can a compiler preprocessor definition be used to push these compiles to the alternate #else initialisation?

              Show
              danblack Daniel Black added a comment - which ones/versions? Can a compiler preprocessor definition be used to push these compiles to the alternate #else initialisation?
              Hide
              jplindst Jan Lindström added a comment -

              c99 style initializers require gcc 4.7

              e.g http://buildbot.askmonty.org/buildbot/builders/kvm-deb-jessie-amd64/builds/4/steps/compile/logs/stdio

              Need to use CHECK_C_SOURCE_COMPILES() in cmake and define some HAVE_xxx that can then be used as compiler preprocessor definition.

              Show
              jplindst Jan Lindström added a comment - c99 style initializers require gcc 4.7 e.g http://buildbot.askmonty.org/buildbot/builders/kvm-deb-jessie-amd64/builds/4/steps/compile/logs/stdio Need to use CHECK_C_SOURCE_COMPILES() in cmake and define some HAVE_xxx that can then be used as compiler preprocessor definition.
              Hide
              jplindst Jan Lindström added a comment -

              Buildbot compiler problems.

              Show
              jplindst Jan Lindström added a comment - Buildbot compiler problems.
              Hide
              danblack Daniel Black added a comment -
              Show
              danblack Daniel Black added a comment - I was going off https://mariadb.com/kb/en/mariadb/building-mariadb-release-on-ubuntu-1204-lts-precise-pangolin/ and assuming 4.7 was the minimum version.
              Hide
              danblack Daniel Black added a comment -

              nice fix on commits list. thanks.

              Show
              danblack Daniel Black added a comment - nice fix on commits list. thanks.
              Hide
              jplindst Jan Lindström added a comment -

              commit 3832bda1ba9f31294d57b565030ea3f5d35e6a82
              Author: Jan Lindström <jan.lindstrom@mariadb.com>
              Date: Thu May 7 14:00:14 2015 +0300

              Fix compiler error if compiler does not support c99 style
              initializers.

              Show
              jplindst Jan Lindström added a comment - commit 3832bda1ba9f31294d57b565030ea3f5d35e6a82 Author: Jan Lindström <jan.lindstrom@mariadb.com> Date: Thu May 7 14:00:14 2015 +0300 Fix compiler error if compiler does not support c99 style initializers.

                People

                • Assignee:
                  jplindst Jan Lindström
                  Reporter:
                  danblack Daniel Black
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: