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

Re: [ploticus] compiling question: lack of prototypes in scope

Expand Messages
  • Stephen C. Grubb
    Tim, there was no reason for not including headers. I use gcc which doesn t issue these warnings (on solaris, linux, and NT mingw, as I use it), and I ve
    Message 1 of 2 , Nov 15 8:47 AM
      Tim, there was no reason for not including headers. I use gcc which
      doesn't issue these warnings (on solaris, linux, and NT mingw, as I use
      it), and I've never had reason to add the headers for functions that
      return int or equivalent, or where the return value is never checked such
      as with strcpy().

      I believe all to be fine as is.

      Steve


      On Mon, 15 Nov 2004, Tim Butler wrote:

      >
      >
      > I was compiling ploticus with a new compiler (Sun's) the other
      > day, and the default warning level changed from the previous
      > compiler, so I noticed that ploticus doesn't include headers
      > for a lot of library functions.
      >
      > gcc with -Wall shows this too:
      >
      > $ make
      > gcc -Wall -DPLOTICUS -DUNIX -DTDH_NOREC -DWZ -DNOSWF -I/usr/
      > X11R6/include -DPREFABS_DIR=\""/var/www/cgi-bin/lib/ploticus"\" -c
      > -o pl.o pl.c
      > pl.c:15: warning: return type defaults to `int'
      > pl.c: In function `version_msg':
      > pl.c:18: warning: implicit declaration of function `PL_devstring'
      > pl.c:44: warning: implicit declaration of function `exit'
      > pl.c: At top level:
      > pl.c:48: warning: return type defaults to `int'
      > pl.c: In function `main':
      > pl.c:68: warning: implicit declaration of function `putenv'
      > pl.c:74: warning: implicit declaration of function
      > `PL_do_preliminaries'
      > pl.c:85: warning: implicit declaration of function `strcpy'
      > pl.c:96: warning: implicit declaration of function `PL_devavail'
      > pl.c:96: warning: implicit declaration of function `PLGG_setimfmt'
      > ...
      >
      >
      > Before I decide to add all of the missing includes or turn off
      > the warnings on Sun's compiler, is there a reason for not including
      > most of these headers? If there all known to be 100% ok with the
      > implicit declarations, I may turn off the warnings, otherwise I'll
      > probably want to add the includes.
      >
      > thanks,
      > tim
      >
      >
      >
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >


      Stephen C. Grubb scg@...
      Scientific Software Engineer, The Jackson Laboratory
      600 Main Street Bar Harbor, Maine 04609 USA
    Your message has been successfully submitted and would be delivered to recipients shortly.