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

compiler warnings of gcc 7 in tabjson.ccp

Details

    Description

      gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0

      || storage/connect/tabjson.cpp: In function ‘_qryres* JSONColumns(PGLOBAL, PCSZ, PCSZ, PTOS, bool)’:
      /home/sanja/maria/git/server/storage/connect/tabjson.cpp|72 col 9| warning: no previous declaration for ‘_qryres* JSONColumns(PGLOBAL, PCSZ, PCSZ, PTOS, bool)’ [-Wmissing-declarations]
      ||  PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info)
      ||          ^~~~~~~~~~~
      

      Attachments

        Activity

          Just a warning from a parano compiler.

          bertrandop Olivier Bertrand added a comment - Just a warning from a parano compiler.
          danblack Daniel Black added a comment -

          Just an ignored bug from a developer who can't code to the standard of the compiler.

          When you start ignoring warnings you get code that works by pure dumb luck. You know the difference between a pointer and value right?
          https://github.com/MariaDB/server/pull/808

          Or warnings like CONC-329 that actually change the behaviour.

          A culture of ignoring warnings or attributing them to parano compliers isn't very reassuring and reflects beyond the connect engine to mariadb overall.

          danblack Daniel Black added a comment - Just an ignored bug from a developer who can't code to the standard of the compiler. When you start ignoring warnings you get code that works by pure dumb luck. You know the difference between a pointer and value right? https://github.com/MariaDB/server/pull/808 Or warnings like CONC-329 that actually change the behaviour. A culture of ignoring warnings or attributing them to parano compliers isn't very reassuring and reflects beyond the connect engine to mariadb overall.
          bertrandop Olivier Bertrand added a comment - - edited

          Sure enough, but it depends on the warning. I just spent several days fixing MDEV-16672 by removing many warnings some of them showing the possibility of real bugs. Just to say that I have no culture of ignoring warnings.

          But this one is the most stupid one I know. It just says that instead of:

          PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info)
          {
          ...
          }
          

          this compiler requires:

          PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info);
           
          PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info)
          {
          ...
          }
          

          Why not but, in addition, if this is regarded as a bug, it is a gcc compiler bug. Indeed, this declaration does exist in tabjson.h line 19 that is included by tabjson.cpp (unless perhaps you are using an old MariaDB version?)

          This is why I reported it as "Not a bug" and not "Won't fix" because it was not ignored but already fixed.

          Anyway, thanks for reporting warnings that are not issued by all compilers, but because they are reported as "bugs", they should not be over qualify as "Major" when they are clearly not.

          bertrandop Olivier Bertrand added a comment - - edited Sure enough, but it depends on the warning. I just spent several days fixing MDEV-16672 by removing many warnings some of them showing the possibility of real bugs. Just to say that I have no culture of ignoring warnings. But this one is the most stupid one I know. It just says that instead of: PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) { ... } this compiler requires: PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info);   PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) { ... } Why not but, in addition, if this is regarded as a bug, it is a gcc compiler bug. Indeed, this declaration does exist in tabjson.h line 19 that is included by tabjson.cpp (unless perhaps you are using an old MariaDB version?) This is why I reported it as "Not a bug" and not "Won't fix" because it was not ignored but already fixed. Anyway, thanks for reporting warnings that are not issued by all compilers, but because they are reported as "bugs", they should not be over qualify as "Major" when they are clearly not.

          People

            bertrandop Olivier Bertrand
            sanja Oleksandr Byelkin
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.