Added casts on 2 parameters to g_snprintf.

This commit is contained in:
Leonard den Ottolander 2005-04-27 21:02:59 +00:00
parent 2a6e12765a
commit 8994b8bbec
2 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2005-04-27 Leonard den Ottolander <leonard * den ottolander nl>
* editdraw.c (status_string): Added casts on 2 parameters to
g_snprintf.
2005-03-17 Pavel Roskin <proski@gnu.org> 2005-03-17 Pavel Roskin <proski@gnu.org>
* editcmd.c (edit_replace_cmd): Restore correct behavior of * editcmd.c (edit_replace_cmd): Restore correct behavior of

View File

@ -70,12 +70,12 @@ static void status_string (WEdit * edit, char *s, int w)
*/ */
if (edit->curs1 < edit->last_byte) { if (edit->curs1 < edit->last_byte) {
unsigned char cur_byte = edit_get_byte (edit, edit->curs1); unsigned char cur_byte = edit_get_byte (edit, edit->curs1);
g_snprintf (byte_str, sizeof(byte_str), "%c %3d 0x%02X", g_snprintf (byte_str, sizeof (byte_str), "%c %3d 0x%02X",
is_printable(cur_byte) ? cur_byte : '.', is_printable (cur_byte) ? cur_byte : '.',
cur_byte, (int) cur_byte,
cur_byte); (unsigned) cur_byte);
} else { } else {
strcpy(byte_str, "<EOF>"); strcpy (byte_str, "<EOF>");
} }
/* The field lengths just prevent the status line from shortening too much */ /* The field lengths just prevent the status line from shortening too much */