1. Back in the day we wrote C without support for type checking. Many bugs were missed because of this. Someone wrote lint and many bugs were prevented. Not everyone takes advantage of tools that prevent easily fixed errors. MySQL builds are done without using the -Wall option in gcc to generate more warnings. Nor do they use the -Werror option to fail on warnings. This allows for some silly things in production releases like bug 51289 (return NULL for a function that is declared to return double):
    double Item_cache_decimal::val_real()
    {
      DBUG_ASSERT(fixed);
      double res;
      if (!value_cached && !cache_value())
        return NULL;
    Not using -Wall and -Werror allows for more serious problems to be missed. Bug 42733 is an example of one such problem. It also has allowed me to miss problems in code that I change.

    I filed bug 53445 for this. MySQL has been very good at fixing things lately. This should also get fixed. Visit the bug and subscribe to it or update it.

    Searching for "site:bugs.mysql.com compiler warning" finds a lot of entries.
    13

    View comments

Loading