Build will fail like below $ ./autogen.sh --enable-tests --disable-asserts ... CC libdbus_1_la-dbus-object-tree.lo dbus-object-tree.c: In function 'object_tree_test_iteration': dbus-object-tree.c:1697:9: error: variable 'nb' set but not used [-Werror=unused-but-set-variable] dbus-object-tree.c:1525:15: error: unused variable 'exact_match' [-Werror=unused-variable] cc1: all warnings being treated as errors
Created attachment 81256 [details] [review] [PATCH] Fix build failure if tests enabled but asserts disabled
(In reply to comment #0) > $ ./autogen.sh --enable-tests --disable-asserts That configuration doesn't make sense. The "embedded" tests work entirely in terms of _dbus_assert (test has not failed); so turning off assertions makes these tests useless.
(In reply to comment #2) > (In reply to comment #0) > > $ ./autogen.sh --enable-tests --disable-asserts > > That configuration doesn't make sense. The "embedded" tests work entirely in > terms of > > _dbus_assert (test has not failed); > > so turning off assertions makes these tests useless. Yes, I think one do that should be warned by the NOTE from configure. " NOTE: building with embedded tests but without assertions means tests may not properly report failures (this configuration is only useful when doing something like profiling the tests) " This trivial patch just make dbus build more robust I think. From my POV, since we provide these valid configure options, it's not bad we just make sure they can build.
(In reply to comment #3) > This trivial patch just make dbus build more robust I think. From my POV, > since we provide these valid configure options, it's not bad we just make > sure they can build. If you want this configuration to work, please turn off some of the -Wunused-* family if it's detected (we already turn off -Wunused-label sometimes). I'm not interested in working around "unused stuff" warnings in the tests.
(In reply to comment #4) > (In reply to comment #3) > > This trivial patch just make dbus build more robust I think. From my POV, > > since we provide these valid configure options, it's not bad we just make > > sure they can build. > > If you want this configuration to work, please turn off some of the > -Wunused-* family if it's detected (we already turn off -Wunused-label > sometimes). I'm not interested in working around "unused stuff" warnings in > the tests. How about another solution,sounds like that: --disable-asserts will disable tests?
Created attachment 81522 [details] [review] [PATCH] Ignore more unused staff if build with tests but without asserts As you suggested, this is a better solution.
Comment on attachment 81522 [details] [review] [PATCH] Ignore more unused staff if build with tests but without asserts Review of attachment 81522 [details] [review]: ----------------------------------------------------------------- "stuff" not "staff", but yes.
Fixed in git for 1.7.6
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.