[vte] Fix even more warnings. We're mostly warning-clean now
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vte] Fix even more warnings. We're mostly warning-clean now
- Date: Fri, 23 Oct 2009 23:02:36 +0000 (UTC)
commit efaf2668d21f53ada2884157fde91c0b61025fc7
Author: Behdad Esfahbod <behdad behdad org>
Date: Fri Oct 23 19:01:38 2009 -0400
Fix even more warnings. We're mostly warning-clean now
src/pty.c | 3 +--
src/vteaccess.c | 4 ++--
src/vtedraw.c | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/pty.c b/src/pty.c
index 4d90bb9..ea59c5f 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -996,8 +996,7 @@ _vte_pty_open(pid_t *child_pid, char **env_add,
if (wtmp) {
op += 4;
}
- g_assert(op >= 0);
- g_assert(op < G_N_ELEMENTS(opmap));
+ g_assert(op >= 0 && op < (int) G_N_ELEMENTS(opmap));
if (ret == -1 && op != 0) {
ret = _vte_pty_open_with_helper(&child, env_add, command, argv,
directory,
diff --git a/src/vteaccess.c b/src/vteaccess.c
index b53611e..3c87553 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -1022,7 +1022,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
if (offset >= (int) priv->snapshot_characters->len) {
return g_strdup("");
}
- g_assert(offset < priv->snapshot_characters->len);
+ g_assert(offset < (int) priv->snapshot_characters->len);
g_assert(offset >= 0);
switch (boundary_type) {
@@ -1302,7 +1302,7 @@ vte_terminal_accessible_get_character_at_offset(AtkText *text, gint offset)
priv = g_object_get_data(G_OBJECT(text),
VTE_TERMINAL_ACCESSIBLE_PRIVATE_DATA);
- g_assert(offset < priv->snapshot_characters->len);
+ g_assert(offset < (int) priv->snapshot_characters->len);
mapped = g_array_index(priv->snapshot_characters, int, offset);
diff --git a/src/vtedraw.c b/src/vtedraw.c
index 1eeeb9b..3ff3ec5 100644
--- a/src/vtedraw.c
+++ b/src/vtedraw.c
@@ -352,7 +352,7 @@ _vte_draw_text (struct _vte_draw *draw,
/* handle fonts that lack a bold face by double-striking */
if (bold && !(draw->impl->has_bold && draw->impl->has_bold (draw))) {
- int i;
+ gsize i;
/* Take a step to the right. */
for (i = 0; i < n_requests; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]