On Thu, Feb 16, 2017 at 4:39 PM, Yann Ylavic <[email protected]> wrote: > On Thu, Feb 16, 2017 at 11:33 PM, Yann Ylavic <[email protected]> wrote: >> On Thu, Feb 16, 2017 at 10:52 PM, William A Rowe Jr <[email protected]> >> wrote: >>> I'm not clear that this was a good usage of the current API... >>> >>> In file included from httpd-2.x/modules/ssl/ssl_private.h:90:0, >>> from httpd-2.x/modules/ssl/ssl_engine_init.c:29: >>> httpd-2.x/modules/ssl/ssl_engine_init.c: In function >>> ‘ssl_init_server_certs’: >>> include/openssl/ssl.h:1287:51: warning: statement with no effect >>> [-Wunused-value] >>> # define SSL_CTX_set_ecdh_auto(dummy, onoff) ((onoff) != 0) >>> ^ >>> httpd-2.x/modules/ssl/ssl_engine_init.c:1328:9: note: in expansion of >>> macro ‘SSL_CTX_set_ecdh_auto’ >>> SSL_CTX_set_ecdh_auto(mctx->ssl_ctx, 1); >>> ^~~~~~~~~~~~~~~~~~~~~ >> >> Looks like OpenSSL missed a cast to void in its macro implementation. >> I think goal was to still evaluate "onoff", but in this case >> "((void)((onoff) != 0))" or the usual "do (void)((onoff) != 0); while >> (0)" would have been more clean/compatible... > > Wait, SSL_CTX_set_ecdh_auto() used to return an int so the macro is > right actually. > Hmm, picky compiler :) > >> >> I guess we'll have to work around this with our own (void) casting. > > That still holds...
It was complaining about the unused 'dummy'. IMO, and perhaps the fact that (1 != 0) evaluates to a constant expression. Easier to drop it from the compilation path for 1.1.0+
