Got to love debian! That's a warning, and debian builds tend to treat warnings as errors. I'll check in a fix today.
The problem is that we are performing an assignment in a conditional - which is accurate, but generally frowned upon. I think, but I'm not sure, it will build if you wrap the while on line 13 of src/env_hash.cpp with parens like this:
while( (c = *str++) )
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> I think, but I'm not sure, it will build if you wrap the while
> on line 13 of src/env_hash.cpp with parens like this
Yes, this modification has resolved the "warning" and make was continuing ... until his next "warning" and break :(
env_value.cpp: In member function `std::string env_value::operator[](int)':
env_value.cpp:17: warning: comparison between signed and unsigned integer
expressions
Are you interested into debian "warning" feedbacks? Otherwise i try to motivate g++ to ignore warnings :)
marc
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've fixed all of the warnings listed in this report, plus others. I've also modified the default build to build -Wall -Werror, which should avoid future similar problems.
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
i run into problems, trying to install mod_cplusplus under ubuntu linux (debian derivat).
"make" show me the following errors:
[..]
make all-recursive
make[1]: Gehe in Verzeichnis /var/opt/mod_cplusplus
Making all in src
make[2]: Gehe in Verzeichnis /var/opt/mod_cplusplus/src
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -pthread -Werror -g -I/var/opt/mod_cplusplus/include -g -O2 -c env_hash.cpp
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -pthread -Werror -g -I/var/opt/mod_cplusplus/include -g -O2 -Wp,-MD,.deps/env_hash.pp -c env_hash.cpp -fPIC -DPIC -o .libs/env_hash.o
env_hash.cpp: In member function `long unsigned int
env_bucket_entry::hash_code()':
env_hash.cpp:13: warning: suggest parentheses around assignment used as truth
value
make[2]: *** [env_hash.lo] Fehler 1
make[2]: Verlasse Verzeichnis /var/opt/mod_cplusplus/src
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlasse Verzeichnis /var/opt/mod_cplusplus
make: *** [all-recursive-am] Fehler 2
Any idea how to fix this?
Thanx a lot,
marc
Hi Marc -
Got to love debian! That's a warning, and debian builds tend to treat warnings as errors. I'll check in a fix today.
The problem is that we are performing an assignment in a conditional - which is accurate, but generally frowned upon. I think, but I'm not sure, it will build if you wrap the while on line 13 of src/env_hash.cpp with parens like this:
while( (c = *str++) )
Hi John,
thanx alot for your fast answer.
> I think, but I'm not sure, it will build if you wrap the while
> on line 13 of src/env_hash.cpp with parens like this
Yes, this modification has resolved the "warning" and make was continuing ... until his next "warning" and break :(
env_value.cpp: In member function `std::string env_value::operator[](int)':
env_value.cpp:17: warning: comparison between signed and unsigned integer
expressions
Are you interested into debian "warning" feedbacks? Otherwise i try to motivate g++ to ignore warnings :)
marc
I'm certainly interested in debian warnings! I need to get a build server up running debian - in the mean time I'll keep fixing them as you hit them.
Thanks -
John
To get all warnings, I used "make -k -i".
---
make all-recursive
make[1]: Gehe in Verzeichnis /var/opt/mod_cplusplus
Making all in src
make[2]: Gehe in Verzeichnis /var/opt/mod_cplusplus/src
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -pthread -Werror -g -I/var/opt/mod_cplusplus/include -g -O2 -c env_value.cpp
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -pthread -Werror -g -I/var/opt/mod_cplusplus/include -g -O2 -Wp,-MD,.deps/env_value.pp -c env_value.cpp -fPIC -DPIC -o .libs/env_value.o
env_value.cpp: In member function `std::string env_value::operator[](int)':
env_value.cpp:17: warning: comparison between signed and unsigned integer
expressions
make[2]: [env_value.lo] Fehler 1 (ignoriert)
/bin/sh ../libtool --mode=link g++ -g -O2 -o libmod_cplusplus.la -rpath /usr/local/lib -release 1.1.0 mod_cplusplus.lo apache_handler.lo apache_filters.lo apache_protocol.lo cpp_request.lo cpp_server.lo apache_output_buffer.lo request_env.lo env_hash.lo env_value.lo -lstdc++
libtool: link: `env_value.lo' is not a valid libtool object
make[2]: [libmod_cplusplus.la] Fehler 1 (ignoriert)
make[2]: Verlasse Verzeichnis /var/opt/mod_cplusplus/src
Making all in example
make[2]: Gehe in Verzeichnis /var/opt/mod_cplusplus/example
Making all in handler
make[3]: Gehe in Verzeichnis /var/opt/mod_cplusplus/example/handler
/bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -pthread -Werror -g -I/var/opt/mod_cplusplus/include -g -O2 -c test_handler.cpp
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -I/usr/include/apache2 -I/usr/include/apr-0 -I/usr/include/apr-0 -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -pthread -Werror -g -I/var/opt/mod_cplusplus/include -g -O2 -Wp,-MD,.deps/test_handler.pp -c test_handler.cpp -fPIC -DPIC -o .libs/test_handler.o
test_handler.cpp: In member function `virtual int
TestHandler::handler(ApacheRequestRec*)':
test_handler.cpp:20: warning: unused variable `char buf[8192]'
test_handler.cpp:21: warning: unused variable `apr_size_t len_read'
test_handler.cpp:22: warning: unused variable `apr_status_t rc'
make[3]: [test_handler.lo] Fehler 1 (ignoriert)
/bin/sh ../../libtool --mode=link g++ -g -O2 -o libtest_handler.la -rpath /usr/local/lib test_handler.lo test_auth.lo
libtool: link: `test_handler.lo' is not a valid libtool object
make[3]: [libtest_handler.la] Fehler 1 (ignoriert)
make[3]: Verlasse Verzeichnis /var/opt/mod_cplusplus/example/handler
Making all in input_filter
make[3]: Gehe in Verzeichnis /var/opt/mod_cplusplus/example/input_filter
make[3]: Fr das Ziel all ist nichts zu tun.
make[3]: Verlasse Verzeichnis /var/opt/mod_cplusplus/example/input_filter
Making all in output_filter
make[3]: Gehe in Verzeichnis /var/opt/mod_cplusplus/example/output_filter
make[3]: Fr das Ziel all ist nichts zu tun.
make[3]: Verlasse Verzeichnis /var/opt/mod_cplusplus/example/output_filter
Making all in protocol
make[3]: Gehe in Verzeichnis /var/opt/mod_cplusplus/example/protocol
make[3]: Fr das Ziel all ist nichts zu tun.
make[3]: Verlasse Verzeichnis /var/opt/mod_cplusplus/example/protocol
make[3]: Gehe in Verzeichnis /var/opt/mod_cplusplus/example
make[3]: Fr das Ziel all-am ist nichts zu tun.
make[3]: Verlasse Verzeichnis /var/opt/mod_cplusplus/example
make[2]: Verlasse Verzeichnis /var/opt/mod_cplusplus/example
Making all in test
make[2]: Gehe in Verzeichnis /var/opt/mod_cplusplus/test
make[2]: Fr das Ziel all ist nichts zu tun.
make[2]: Verlasse Verzeichnis /var/opt/mod_cplusplus/test
make[2]: Gehe in Verzeichnis /var/opt/mod_cplusplus
make[2]: Verlasse Verzeichnis /var/opt/mod_cplusplus
make[1]: Verlasse Verzeichnis /var/opt/mod_cplusplus
Sweet! nice work. I'll start working through these tonight and try to release a new version soon.
Thanks again.
John
Hi -
I've fixed all of the warnings listed in this report, plus others. I've also modified the default build to build -Wall -Werror, which should avoid future similar problems.
Thanks!
mod_cplusplus 1.5.2 does compile under ubuntu without ANY warning. "make check" reports: "All tests successful".
Thanks a lot john!