php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #135 a bunch of warnings (compiles ok)
Submitted: 1998-03-03 01:47 UTC Modified: 1998-04-10 10:30 UTC
From: ars at ziplink dot net Assigned:
Status: Closed Package: Compile Warning
PHP Version: 3.0 Latest CVS OS: FreeBSD
Private report: No CVE-ID: None
 [1998-03-03 01:47 UTC] ars at ziplink dot net
Here is a list of warnings that I get while compiling php3,
reformatted a bit for ease of reading. (It compiles and runs
fine.)

Configure line is:
./configure --with-mysql=/mySql --enable-safe-mode
--enable-track-vars --enable-debugger --prefix=/www1
--enable-bcmath "--bindir=\${exec_prefix}"
--enable-maintainer-mode --with-config-file-path=/www1                           

Replace GCC with:

gcc -O2 -I. -I/mySql/include -g -Wall -Wmissing-prototypes
    -Wstrict-prototypes -Wmissing-declarations


GCC -c language-parser.tab.c -o language-parser.tab.o
In file included from language-parser.y:51:
control_structures_inline.h:
warning: no previous prototype for: (line#: variable)
1340: `add_regular_encapsed_variable'
1351: `add_assoc_array_encapsed_variable'
1361: `add_regular_array_encapsed_variable'
1374: `add_variable_array_encapsed_variable'
1386: `add_encapsed_object_property'
1397: `add_indirect_encapsed_variable'

GCC -c main.c -o main.o
main.c: warning: no previous prototype for:
478: `php3_set_time_limit'
755: `php3_config_ini_startup'
938: `php3_config_ini_shutdown'

GCC -c debugger.c -o debugger.o
debugger.c:479: warning:
     no previous prototype for `_php3_send_error'

GCC -c configuration-parser.tab.c -o configuration-parser.tab.o
configuration-parser.y:210: warning:
     function declaration isn't a prototype
configuration-parser.y:243: warning:
     no previous prototype for `php3_mshutdown_browscap'

GCC -c functions/filestat.c -o functions/filestat.o
functions/filestat.c: warning: no previous prototype for:
502: `php3_iswritable'
503: `php3_isreadable'
504: `php3_isexec'
505: `php3_isfile'
506: `php3_isdir'
507: `php3_islink'
508: `php3_fileexists'

GCC -c functions/bcmath.c -o functions/bcmath.o
In file included from functions/bcmath.c:36:
functions/number.h:97: warning:
     function declaration isn't a prototype
functions/number.h:98: warning:
     function declaration isn't a prototype

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-10 10:30 UTC] zeev
Most of these fixed, some new ones, here is the current set
to document them:

debugger.c:478: warning: no previous prototype for
     `_php3_send_error'
functions/file.c:174: warning: no previous prototype for
     `php3_closesocket'
functions/math.c:461: warning: no previous prototype for
     `_php3_number_format'


---

I don't think we should have -Wmissing-prototypes generated
warnings on the bug database.  They are harmless in 99.99%
of the cases, no point at showing them off.
Generally, every once in a while somebody can turn on
-Wmissing-prototypes and fix all of these warnings up.

(Zeev)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC