Use portable format specifiers: Case %lld - plain - sprintf.

Fix uses of plain "%lld" within sprintf():
- Replace "%lld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
This commit is contained in:
Eliseo Martínez 2014-04-19 19:29:11 +02:00 committed by Thiago de Arruda
parent 8f710a4103
commit 7dc649c906

View File

@ -4148,7 +4148,7 @@ void msg_add_lines(int insert_space, long lnum, off_t nchars)
*p++ = ' ';
if (shortmess(SHM_LINES)) {
#ifdef LONG_LONG_OFF_T
sprintf((char *)p, "%ldL, %lldC", lnum, nchars);
sprintf((char *)p, "%ldL, %" PRId64 "C", lnum, (int64_t)nchars);
#else
/* Explicit typecast avoids warning on Mac OS X 10.6 */
sprintf((char *)p, "%ldL, %ldC", lnum, (long)nchars);