cleanup: Adapt type and cast to get ride of warnings
This commit is contained in:
@@ -366,7 +366,7 @@ _inp_write(char* line, int offset)
|
||||
if (line[i] == '\n') {
|
||||
c = retc;
|
||||
ch_len = wctomb(retc, L'\u23ce'); /* return symbol */
|
||||
if (ch_len == -1) { /* not representable */
|
||||
if (ch_len == (size_t)-1) { /* not representable */
|
||||
retc[0] = '\\';
|
||||
ch_len = 1;
|
||||
}
|
||||
|
||||
@@ -1871,7 +1871,7 @@ _win_print_wrapped(WINDOW* win, const char* const message, size_t indent, int pa
|
||||
curr_ch++;
|
||||
continue;
|
||||
}
|
||||
int offset = 0;
|
||||
size_t offset = 0;
|
||||
while (offset < ch_len) {
|
||||
word[wordi++] = curr_ch[offset++];
|
||||
}
|
||||
@@ -1880,7 +1880,7 @@ _win_print_wrapped(WINDOW* win, const char* const message, size_t indent, int pa
|
||||
word[wordi] = '\0';
|
||||
wordlen = utf8_display_len(word);
|
||||
|
||||
int curx = getcurx(win);
|
||||
size_t curx = (size_t)getcurx(win);
|
||||
int cury;
|
||||
size_t maxx = getmaxx(win);
|
||||
|
||||
@@ -1892,7 +1892,7 @@ _win_print_wrapped(WINDOW* win, const char* const message, size_t indent, int pa
|
||||
if (wordlen > linelen) {
|
||||
gchar* word_ch = g_utf8_offset_to_pointer(word, 0);
|
||||
while (*word_ch != '\0') {
|
||||
curx = getcurx(win);
|
||||
curx = (size_t)getcurx(win);
|
||||
cury = getcury(win);
|
||||
gboolean firstline = cury == starty;
|
||||
|
||||
@@ -1913,7 +1913,7 @@ _win_print_wrapped(WINDOW* win, const char* const message, size_t indent, int pa
|
||||
// newline and print word
|
||||
} else {
|
||||
waddch(win, '\n');
|
||||
curx = getcurx(win);
|
||||
curx = (size_t)getcurx(win);
|
||||
cury = getcury(win);
|
||||
gboolean firstline = cury == starty;
|
||||
|
||||
@@ -1928,7 +1928,7 @@ _win_print_wrapped(WINDOW* win, const char* const message, size_t indent, int pa
|
||||
|
||||
// no wrap required
|
||||
} else {
|
||||
curx = getcurx(win);
|
||||
curx = (size_t)getcurx(win);
|
||||
cury = getcury(win);
|
||||
gboolean firstline = cury == starty;
|
||||
|
||||
|
||||
@@ -308,7 +308,7 @@ _free_late_delivery_userdata(LateDeliveryUserdata* d)
|
||||
void
|
||||
iq_handlers_remove_win(ProfWin* window)
|
||||
{
|
||||
log_debug("Remove window %p of type %d", window, window ? window->type : -1);
|
||||
log_debug("Remove window %p of type %d", window, window ? window->type : (win_type_t)-1);
|
||||
if (!window)
|
||||
return;
|
||||
GSList *cur = late_delivery_windows, *next;
|
||||
@@ -400,7 +400,7 @@ iq_autoping_check(void)
|
||||
}
|
||||
|
||||
gdouble elapsed = g_timer_elapsed(autoping_time, NULL);
|
||||
unsigned long seconds_elapsed = elapsed * 1.0;
|
||||
gint seconds_elapsed = elapsed * 1.0;
|
||||
gint timeout = prefs_get_autoping_timeout();
|
||||
if (timeout > 0 && seconds_elapsed >= timeout) {
|
||||
cons_show("Autoping response timed out after %u seconds.", timeout);
|
||||
|
||||
@@ -424,8 +424,8 @@ session_check_autoaway(void)
|
||||
gboolean check = prefs_get_boolean(PREF_AUTOAWAY_CHECK);
|
||||
gint away_time = prefs_get_autoaway_time();
|
||||
gint xa_time = prefs_get_autoxa_time();
|
||||
int away_time_ms = away_time * 60000;
|
||||
int xa_time_ms = xa_time * 60000;
|
||||
unsigned long away_time_ms = away_time * 60000;
|
||||
unsigned long xa_time_ms = xa_time * 60000;
|
||||
|
||||
const char* account = session_get_account_name();
|
||||
resource_presence_t curr_presence = accounts_get_last_presence(account);
|
||||
|
||||
Reference in New Issue
Block a user