Fix some compiler warnings

`-Weverything' seems to have found a few problems.

Also enabled clang sanitizers by default.
This commit is contained in:
2014-07-19 17:44:49 +02:00
parent 43d34d2473
commit 027333e56a
5 changed files with 25 additions and 19 deletions

View File

@@ -55,8 +55,8 @@ struct plugin_data
LIST_HEADER (plugin_data)
struct bot_context *ctx; ///< Parent context
pid_t pid; ///< PID of the plugin process
char *name; ///< Plugin identifier
pid_t pid; ///< PID of the plugin process
bool is_zombie; ///< Whether the child is a zombie
bool initialized; ///< Ready to exchange IRC messages
@@ -66,9 +66,9 @@ struct plugin_data
// we don't stall on plugins unnecessarily.
int read_fd; ///< The read end of the comm. pipe
struct str read_buffer; ///< Unprocessed input
int write_fd; ///< The write end of the comm. pipe
struct str read_buffer; ///< Unprocessed input
struct str write_buffer; ///< Output yet to be sent out
};
@@ -1610,7 +1610,7 @@ on_signal_pipe_readable (const struct pollfd *fd, struct bot_context *ctx)
// "plugin `name' died like a dirty jewish pig"; use `status'
if (!plugin->is_zombie && WIFSIGNALED (status))
{
char *notes = "";
const char *notes = "";
#ifdef WCOREDUMP
if (WCOREDUMP (status))
notes = " (core dumped)";