comparison src/fileio.c @ 13610:e76499e85744 v8.0.1677

patch 8.0.1677: no compiler warning for wrong format in vim_snprintf() commit https://github.com/vim/vim/commit/ea39176baab52b646d1e2676e662def718ddd365 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 8 13:07:22 2018 +0200 patch 8.0.1677: no compiler warning for wrong format in vim_snprintf() Problem: No compiler warning for wrong format in vim_snprintf(). Solution: Add printf attribute for gcc. Fix reported problems.
author Christian Brabandt <cb@256bit.org>
date Sun, 08 Apr 2018 13:15:07 +0200
parents 4df23d9bad47
children 7b818f7bb738
comparison
equal deleted inserted replaced
13609:67cb9088e452 13610:e76499e85744
5313 5313
5314 if (insert_space) 5314 if (insert_space)
5315 *p++ = ' '; 5315 *p++ = ' ';
5316 if (shortmess(SHM_LINES)) 5316 if (shortmess(SHM_LINES))
5317 vim_snprintf((char *)p, IOSIZE - (p - IObuff), 5317 vim_snprintf((char *)p, IOSIZE - (p - IObuff),
5318 "%ldL, %lldC", lnum, (varnumber_T)nchars); 5318 "%ldL, %lldC", lnum, (long long)nchars);
5319 else 5319 else
5320 { 5320 {
5321 if (lnum == 1) 5321 if (lnum == 1)
5322 STRCPY(p, _("1 line, ")); 5322 STRCPY(p, _("1 line, "));
5323 else 5323 else
5325 p += STRLEN(p); 5325 p += STRLEN(p);
5326 if (nchars == 1) 5326 if (nchars == 1)
5327 STRCPY(p, _("1 character")); 5327 STRCPY(p, _("1 character"));
5328 else 5328 else
5329 vim_snprintf((char *)p, IOSIZE - (p - IObuff), 5329 vim_snprintf((char *)p, IOSIZE - (p - IObuff),
5330 _("%lld characters"), (varnumber_T)nchars); 5330 _("%lld characters"), (long long)nchars);
5331 } 5331 }
5332 } 5332 }
5333 5333
5334 /* 5334 /*
5335 * Append message for missing line separator to IObuff. 5335 * Append message for missing line separator to IObuff.