1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-15 19:38:07 -04:00

Added -Wall to GCC options

Fixed compiler warnings
This commit is contained in:
James Booth 2012-09-10 22:57:42 +01:00
parent b7c1209744
commit 6b1b035d92
7 changed files with 17 additions and 27 deletions

View File

@ -42,7 +42,7 @@ PKG_CHECK_MODULES([DEPS], [openssl glib-2.0 libcurl])
PKG_CHECK_MODULES([NOTIFY], [libnotify], [],
[AC_MSG_NOTICE([libnotify module not found])])
AM_CFLAGS="-O3 "
AM_CFLAGS="-O3 -Wall"
AM_CFLAGS="$AM_CFLAGS -lstrophe -lxml2 -lexpat -lncurses -lcurl -lresolv "
AM_CFLAGS="$AM_CFLAGS $DEPS_LIBS $NOTIFY_LIBS"

View File

@ -81,9 +81,9 @@ create_input_window(void)
void
inp_win_resize(const char * const input, const int size)
{
int rows, cols, inp_x, inp_y;
int rows, cols, inp_x;
getmaxyx(stdscr, rows, cols);
getyx(inp_win, inp_y, inp_x);
inp_x = getcurx(inp_win);
// if lost cursor off screen, move contents to show it
if (inp_x >= pad_start + cols) {

View File

@ -124,7 +124,7 @@ p_history_previous(PHistory history, char *item)
_create_session(history);
// add the new item
g_list_append(history->session.items, copied);
history->session.items = g_list_append(history->session.items, copied);
history->session.sess_new = g_list_last(history->session.items);
char *result = strdup(history->session.sess_curr->data);

View File

@ -122,8 +122,7 @@ status_bar_inactive(const int win)
int active_pos = 1 + ((win -1) * 3);
int rows, cols;
getmaxyx(stdscr, rows, cols);
int cols = getmaxx(stdscr);
mvwaddch(status_bar, 0, cols - 29 + active_pos, ' ');
if (win == 9)
@ -140,8 +139,7 @@ status_bar_active(const int win)
int active_pos = 1 + ((win -1) * 3);
int rows, cols;
getmaxyx(stdscr, rows, cols);
int cols = getmaxx(stdscr);
wattron(status_bar, COLOUR_BAR_DRAW);
if (win < 9)
@ -161,8 +159,7 @@ status_bar_new(const int win)
int active_pos = 1 + ((win -1) * 3);
int rows, cols;
getmaxyx(stdscr, rows, cols);
int cols = getmaxx(stdscr);
wattron(status_bar, COLOUR_BAR_TEXT);
wattron(status_bar, A_BLINK);
@ -212,8 +209,8 @@ status_bar_clear(void)
wclear(status_bar);
int rows, cols;
getmaxyx(stdscr, rows, cols);
int cols = getmaxx(stdscr);
wattron(status_bar, COLOUR_BAR_DRAW);
mvwprintw(status_bar, 0, cols - 29, _active);
wattroff(status_bar, COLOUR_BAR_DRAW);

View File

@ -49,7 +49,6 @@ tinyurl_get(char *url)
g_string_append(full_url, url);
CURL *handle = curl_easy_init();
CURLcode result;
struct curl_data_t output;
output.buffer = NULL;
output.size = 0;
@ -58,7 +57,7 @@ tinyurl_get(char *url)
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, _data_callback);
curl_easy_setopt(handle, CURLOPT_WRITEDATA, (void *)&output);
result = curl_easy_perform(handle);
curl_easy_perform(handle);
curl_easy_cleanup(handle);
output.buffer[output.size++] = '\0';

View File

@ -39,8 +39,7 @@ static void _title_bar_draw_status(void);
void
create_title_bar(void)
{
int rows, cols;
getmaxyx(stdscr, rows, cols);
int cols = getmaxx(stdscr);
title_bar = newwin(1, cols, 0, 0);
wbkgd(title_bar, COLOUR_BAR_DEF);
@ -61,8 +60,7 @@ title_bar_title(void)
void
title_bar_resize(void)
{
int rows, cols;
getmaxyx(stdscr, rows, cols);
int cols = getmaxx(stdscr);
wresize(title_bar, 1, cols);
wbkgd(title_bar, COLOUR_BAR_DEF);
@ -173,8 +171,7 @@ title_bar_draw(void)
static void
_title_bar_draw_status(void)
{
int rows, cols;
getmaxyx(stdscr, rows, cols);
int cols = getmaxx(stdscr);
wattron(title_bar, COLOUR_BAR_DRAW);
mvwaddch(title_bar, 0, cols - 14, '[');

View File

@ -619,12 +619,10 @@ win_handle_special_keys(const int * const ch)
void
win_page_off(void)
{
int rows, cols;
getmaxyx(stdscr, rows, cols);
int rows = getmaxy(stdscr);
_wins[_curr_prof_win].paged = 0;
int y, x;
getyx(_wins[_curr_prof_win].win, y, x);
int y = getcury(_wins[_curr_prof_win].win);
int size = rows - 3;
@ -947,9 +945,8 @@ _win_handle_switch(const int * const ch)
static void
_win_handle_page(const int * const ch)
{
int rows, cols, y, x;
getmaxyx(stdscr, rows, cols);
getyx(_wins[_curr_prof_win].win, y, x);
int rows = getmaxy(stdscr);
int y = getcury(_wins[_curr_prof_win].win);
int page_space = rows - 4;
int *page_start = &_wins[_curr_prof_win].y_pos;