sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
290 stars 27 forks source link

error: format not a string literal and no format arguments #67

Closed mavjs closed 7 years ago

mavjs commented 7 years ago

I'm getting the following errors while trying to make a RPM package:

Making all in src
make[1]: Entering directory '/builddir/build/BUILD/bitlbee-discord-bf5c48dbc099c2a9136c340e772b80336df71583/src'
  CC       discord_la-discord-util.lo
  CC       discord_la-discord-handlers.lo
  CC       discord_la-discord.lo
  CC       discord_la-discord-http.lo
discord-http.c: In function 'discord_http_mfa_cb':
discord-http.c:147:5: error: format not a string literal and no format arguments [-Werror=format-security]
     imcb_error(ic, (char*)json_o_str(js, "message"));
     ^~~~~~~~~~
discord-http.c: In function 'discord_http_login_cb':
discord-http.c:179:5: error: format not a string literal and no format arguments [-Werror=format-security]
     imcb_error(ic, (char*)json_o_str(js, "message"));
     ^~~~~~~~~~
  CC       discord_la-discord-websockets.lo
cc1: some warnings being treated as errors
sm00th commented 7 years ago

Thanks for the report, should be fixed now. Which distro are you building rpms for? Are you planning to maintain some kind of repo I can reference in readme? If it is just for yourself can you share the resulting spec file, I can probably endure maintaining a copr repo for this.

mavjs commented 7 years ago

I was first trying to get it built for Fedora, and then eventually thinking about maintaining a copr repo. If you want, we could probably do a co-maintainership or something. But here is the spec I used.

%global commit0 cda4010f144ea50b70524e669ca1d6611fca77bc
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})

Name:       bitlbee-discord
Version:    0.0.1
Release:    1%{?dist}
Summary:    Discord protocol module for bitlbee

License:    GPLv2
URL:        https://github.com/sm00th/bitlbee-discord/
Source0:    https://github.com/sm00th/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz

BuildRequires:  bitlbee-devel >= 3.5
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
Requires:   bitlbee >= 3.5

%description
The Discord protocol plugin for bitlbee.

%prep
%setup -qn %{name}-%{commit0}
./autogen.sh

%build
%configure
make %{?_smp_mflags}

%install
%make_install
rm -f %{buildroot}%{_libdir}/bitlbee/discord.la

%files
%license LICENSE
%doc README
%{_libdir}/bitlbee/discord.so

%changelog
sm00th commented 7 years ago

Yep, copr repo would be great. I don't want to steal credit from you, nor will I turn down any help with the project. So co-maintainership sounds great, I just want to have some way to keep the package up to date in case you lose interest or won't be able to update it for some other reason.