compilation warnings

compiling bitlbee-mastodon on Debian yields some warnings that you might want to fix, for example:

In file included from mastodon-http.c:32:
mastodon.h:33:20: warning: ISO C does not permit named variadic macros [-Wvariadic-macros]
 #define debug(text ...)
                    ^~~
mastodon-lib.c:3700:2: warning: ISO C does not allow extra ';' outside of a function [-Wpedantic]
 };
  ^

Full log is available here:

https://buildd.debian.org/status/fetch.php?pkg=bitlbee-mastodon&arch=amd64&ver=1.4.1-1&stamp=1550440842&raw=0

Those are probably triggered by extra flags (-Wpedantic and -Wvariadic-macros) in the Debian package, that said. I figured you might still want to take a look.

Tags: Closed

Comments

I wonder: why does this process use different flags that what I'm using? I'm on a Debian derivative (PureOS) and get no warnings. I'd like to reproduce this locally before fixing anything.

– Alex Schroeder 2019-09-24 20:39 UTC


i think those warnings get added by the Debian packaging process, which adds those extra flags. try to compile with:

CFLAGS+=-fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPIC

... i think that about covers it, the build logs have the full flags...

anarcat 2019-10-25 14:19 UTC


Thanks! Hopefully fixed in a6f528b9.

– Alex Schroeder 2019-10-27 16:55 UTC


And I wrote pull request #138 since some of the warnings are from a header file from Bitlbee itself.

– Alex Schroeder 2019-10-27 16:56 UTC


This wiki uses a variant of Markdown.

To save this page you must answer this question:

Please write "new issue" into the field below.