aboutsummaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-04-20 18:33:45 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-23 06:56:32 -0300
commitb536c22550db16836726b38494faa9be2f55e738 (patch)
tree3156f52cce14a2ac333c68e1a0ed8bbd4879f617 /src/fileio.c
parentfb94edf373418362b803e60bed67525bd5720916 (diff)
downloadrneovim-b536c22550db16836726b38494faa9be2f55e738.tar.gz
rneovim-b536c22550db16836726b38494faa9be2f55e738.tar.bz2
rneovim-b536c22550db16836726b38494faa9be2f55e738.zip
Use portable format specifiers: Case %ld - localized - sprintf.
Fix uses of localized "%ld" within sprintf(): - Replace "%ld" with "%" PRId64. - Cast corresponding argument to (int64_t).
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fileio.c b/src/fileio.c
index abfde34a23..25e92893ae 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1884,11 +1884,11 @@ failed:
}
if (conv_error != 0) {
sprintf((char *)IObuff + STRLEN(IObuff),
- _("[CONVERSION ERROR in line %ld]"), (long)conv_error);
+ _("[CONVERSION ERROR in line %" PRId64 "]"), (int64_t)conv_error);
c = TRUE;
} else if (illegal_byte > 0) {
sprintf((char *)IObuff + STRLEN(IObuff),
- _("[ILLEGAL BYTE in line %ld]"), (long)illegal_byte);
+ _("[ILLEGAL BYTE in line %" PRId64 "]"), (int64_t)illegal_byte);
c = TRUE;
} else if (error) {
STRCAT(IObuff, _("[READ ERRORS]"));
@@ -4154,12 +4154,12 @@ void msg_add_lines(int insert_space, long lnum, off_t nchars)
if (lnum == 1)
STRCPY(p, _("1 line, "));
else
- sprintf((char *)p, _("%ld lines, "), lnum);
+ sprintf((char *)p, _("%" PRId64 " lines, "), (int64_t)lnum);
p += STRLEN(p);
if (nchars == 1)
STRCPY(p, _("1 character"));
else {
- sprintf((char *)p, _("%" PRId64 " characters"), nchars);
+ sprintf((char *)p, _("%" PRId64 " characters"), (int64_t)nchars);
}
}
}