Loading ...
Sorry, an error occurred while loading the content.

Warnings Busting

Expand Messages
  • Shlomi Fish
    When I tried to integrate an up-to-date version of Freecell Solver into the kpat in the KDE CVS, I noticed that the compilation generates a lot of warnings and
    Message 1 of 1 , Dec 30, 2002
    • 0 Attachment
      When I tried to integrate an up-to-date version of Freecell Solver into
      the kpat in the KDE CVS, I noticed that the compilation generates a lot of
      warnings and even that it halts at time. I realized the reason was the
      compilation flags given to gcc to compile it:

      <<<
      -ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes
      -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
      >>>

      I fixed the source I placed in the KDE CVS to compile albeit with a lot of
      warnings. Then I wanted to make sure the 2.9.x source in our CVS compiled
      well with these flags, and had as few warnings as possible.

      The results can be found in the CVS. Right now the only warnings generated
      by these flags are:

      1. Some "unused parameter" warnings, which can only be eliminated by using
      the gcc __attribute__(unused), which is a gcc-only feature, that I'd like
      to avoid using.

      2. Some warnings about a static function that was defined but never used.
      This happens due to the rand.h functions which I usually make inline, but
      can only make static with -ansi.

      3. Three "string length `N' is greater than the length `509' ISO C89
      compilers are required to support". Since I need long strings in the
      program (and most compilers support them well) I don't know how I can
      eliminate it either.

      4. Several warnings related to long long in test_multi_parallel.c. (long
      long is not in ISO C89).

      Cheers,

      Shlomi Fish




      ----------------------------------------------------------------------
      Shlomi Fish shlomif@...
      Home Page: http://t2.technion.ac.il/~shlomif/

      He who re-invents the wheel, understands much better how a wheel works.
    Your message has been successfully submitted and would be delivered to recipients shortly.