diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-04-19 12:28:26 +0200 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-23 06:56:32 -0300 |
commit | fb94edf373418362b803e60bed67525bd5720916 (patch) | |
tree | c85dc6180294d90005e21d096ab737e9f65bd6bd /src/fileio.c | |
parent | f916cf067d42d1dfd8ed477fdd5e3f0bda665eee (diff) | |
download | rneovim-fb94edf373418362b803e60bed67525bd5720916.tar.gz rneovim-fb94edf373418362b803e60bed67525bd5720916.tar.bz2 rneovim-fb94edf373418362b803e60bed67525bd5720916.zip |
Use portable format specifiers: Case %ld - plain - sprintf.
Fix uses of plain "%ld" within sprintf():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c index c09a82f613..abfde34a23 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4147,7 +4147,8 @@ void msg_add_lines(int insert_space, long lnum, off_t nchars) if (insert_space) *p++ = ' '; if (shortmess(SHM_LINES)) { - sprintf((char *)p, "%ldL, %" PRId64 "C", lnum, (int64_t)nchars); + sprintf((char *)p, "%" PRId64 "L, %" PRId64 "C", + (int64_t)lnum, (int64_t)nchars); } else { if (lnum == 1) @@ -5696,7 +5697,7 @@ vim_tempname ( mode_t umask_save; # endif - sprintf((char *)itmp + itmplen, "v%ld", nr + off); + sprintf((char *)itmp + itmplen, "v%" PRId64, (int64_t)nr + off); # ifndef EEXIST /* If mkdir() does not set errno to EEXIST, check for * existing file here. There is a race condition then, @@ -5735,7 +5736,7 @@ vim_tempname ( if (vim_tempdir != NULL) { /* There is no need to check if the file exists, because we own the * directory and nobody else creates a file in it. */ - sprintf((char *)itmp, "%s%ld", vim_tempdir, temp_count++); + sprintf((char *)itmp, "%s%" PRId64, vim_tempdir, (int64_t)temp_count++); return vim_strsave(itmp); } |