Commit 57db2b549a0b24693a07d5a5b63de141eb5307b9
1 parent
39d87b5c
Enable more warnings and fix them.
Showing
6 changed files
with
15 additions
and
3 deletions
libpurple/Makefile
... | ... | @@ -12,7 +12,7 @@ else |
12 | 12 | endif |
13 | 13 | |
14 | 14 | CXX ?= g++ |
15 | -CXXFLAGS = -g -Wall -shared -fPIC \ | |
15 | +CXXFLAGS = -g -Wall -Wextra -Werror -pedantic -shared -fPIC \ | |
16 | 16 | -DHAVE_INTTYPES_H -DHAVE_CONFIG_H -DPURPLE_PLUGINS \ |
17 | 17 | `pkg-config --cflags purple` `libgcrypt-config --cflags` `gpg-error-config --cflags` \ |
18 | 18 | $(THRIFT_CXXFLAGS) | ... | ... |
libpurple/httpclient.cpp
... | ... | @@ -140,6 +140,8 @@ void HTTPClient::complete(HTTPClient::Request *req, |
140 | 140 | void HTTPClient::purple_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data, |
141 | 141 | const gchar *url_text, gsize len, const gchar *error_message) |
142 | 142 | { |
143 | + (void)url_data; | |
144 | + | |
143 | 145 | Request *req = (Request *)user_data; |
144 | 146 | |
145 | 147 | req->client->complete(req, url_text, len, error_message); | ... | ... |
libpurple/httpclient.hpp
libpurple/pluginmain.cpp
... | ... | @@ -68,10 +68,14 @@ static void init_prpl_info(PurplePluginProtocolInfo &i) { |
68 | 68 | } |
69 | 69 | |
70 | 70 | static void line_plugin_destroy(PurplePlugin *plugin) { |
71 | + (void)plugin; | |
72 | + | |
71 | 73 | purple_debug_info("line", "shutting down\n"); |
72 | 74 | } |
73 | 75 | |
74 | 76 | static void line_plugin_init(PurplePlugin *plugin) { |
77 | + (void)plugin; | |
78 | + | |
75 | 79 | init_info(info); |
76 | 80 | init_prpl_info(prpl_info); |
77 | 81 | |
... | ... | @@ -79,5 +83,5 @@ static void line_plugin_init(PurplePlugin *plugin) { |
79 | 83 | } |
80 | 84 | |
81 | 85 | extern "C" { |
82 | - PURPLE_INIT_PLUGIN(line, line_plugin_init, info); | |
86 | + PURPLE_INIT_PLUGIN(line, line_plugin_init, info) | |
83 | 87 | } | ... | ... |
libpurple/purpleline.cpp
... | ... | @@ -131,6 +131,8 @@ char *PurpleLine::status_text(PurpleBuddy *buddy) { |
131 | 131 | } |
132 | 132 | |
133 | 133 | void PurpleLine::tooltip_text(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full) { |
134 | + (void)full; | |
135 | + | |
134 | 136 | purple_notify_user_info_add_pair_plaintext(user_info, |
135 | 137 | "Name", purple_buddy_get_alias(buddy)); |
136 | 138 | |
... | ... | @@ -427,6 +429,8 @@ void PurpleLine::push_recent_message(std::string id) { |
427 | 429 | } |
428 | 430 | |
429 | 431 | int PurpleLine::send_im(const char *who, const char *message, PurpleMessageFlags flags) { |
432 | + (void)flags; | |
433 | + | |
430 | 434 | return send_message(who, message); |
431 | 435 | } |
432 | 436 | ... | ... |
libpurple/purpleline_chats.cpp
... | ... | @@ -280,6 +280,8 @@ void PurpleLine::chat_leave(int id) { |
280 | 280 | } |
281 | 281 | |
282 | 282 | int PurpleLine::chat_send(int id, const char *message, PurpleMessageFlags flags) { |
283 | + (void)flags; | |
284 | + | |
283 | 285 | PurpleConversation *conv = purple_find_chat(conn, id); |
284 | 286 | if (!conv) { |
285 | 287 | purple_debug_warning("line", "Tried to send to a nonexistent chat.\n"); | ... | ... |