comparison src/spellfile.c @ 19760:9daed26b788b v8.2.0436

patch 8.2.0436: no warnings for incorrect printf arguments Commit: https://github.com/vim/vim/commit/db99f9f29a248b84742b6779c3343123f72065e7 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 23 22:12:22 2020 +0100 patch 8.2.0436: no warnings for incorrect printf arguments Problem: No warnings for incorrect printf arguments. Solution: Fix attribute in declaration. Fix uncovered mistakes. (Dominique Pelle, closes #5834)
author Bram Moolenaar <Bram@vim.org>
date Mon, 23 Mar 2020 22:15:05 +0100
parents af1eca322b9e
children 435726a03481
comparison
equal deleted inserted replaced
19759:321ee36ae10c 19760:9daed26b788b
4113 if (spin->si_conv.vc_type != CONV_NONE) 4113 if (spin->si_conv.vc_type != CONV_NONE)
4114 { 4114 {
4115 pc = string_convert(&spin->si_conv, rline, NULL); 4115 pc = string_convert(&spin->si_conv, rline, NULL);
4116 if (pc == NULL) 4116 if (pc == NULL)
4117 { 4117 {
4118 smsg(_("Conversion failure for word in %s line %d: %s"), 4118 smsg(_("Conversion failure for word in %s line %ld: %s"),
4119 fname, lnum, rline); 4119 fname, lnum, rline);
4120 continue; 4120 continue;
4121 } 4121 }
4122 line = pc; 4122 line = pc;
4123 } 4123 }
4131 { 4131 {
4132 ++line; 4132 ++line;
4133 if (STRNCMP(line, "encoding=", 9) == 0) 4133 if (STRNCMP(line, "encoding=", 9) == 0)
4134 { 4134 {
4135 if (spin->si_conv.vc_type != CONV_NONE) 4135 if (spin->si_conv.vc_type != CONV_NONE)
4136 smsg(_("Duplicate /encoding= line ignored in %s line %d: %s"), 4136 smsg(_("Duplicate /encoding= line ignored in %s line %ld: %s"),
4137 fname, lnum, line - 1); 4137 fname, lnum, line - 1);
4138 else if (did_word) 4138 else if (did_word)
4139 smsg(_("/encoding= line after word ignored in %s line %d: %s"), 4139 smsg(_("/encoding= line after word ignored in %s line %ld: %s"),
4140 fname, lnum, line - 1); 4140 fname, lnum, line - 1);
4141 else 4141 else
4142 { 4142 {
4143 char_u *enc; 4143 char_u *enc;
4144 4144
4157 } 4157 }
4158 4158
4159 if (STRNCMP(line, "regions=", 8) == 0) 4159 if (STRNCMP(line, "regions=", 8) == 0)
4160 { 4160 {
4161 if (spin->si_region_count > 1) 4161 if (spin->si_region_count > 1)
4162 smsg(_("Duplicate /regions= line ignored in %s line %d: %s"), 4162 smsg(_("Duplicate /regions= line ignored in %s line %ld: %s"),
4163 fname, lnum, line); 4163 fname, lnum, line);
4164 else 4164 else
4165 { 4165 {
4166 line += 8; 4166 line += 8;
4167 if (STRLEN(line) > MAXREGIONS * 2) 4167 if (STRLEN(line) > MAXREGIONS * 2)
4168 smsg(_("Too many regions in %s line %d: %s"), 4168 smsg(_("Too many regions in %s line %ld: %s"),
4169 fname, lnum, line); 4169 fname, lnum, line);
4170 else 4170 else
4171 { 4171 {
4172 spin->si_region_count = (int)STRLEN(line) / 2; 4172 spin->si_region_count = (int)STRLEN(line) / 2;
4173 STRCPY(spin->si_region_name, line); 4173 STRCPY(spin->si_region_name, line);
4177 } 4177 }
4178 } 4178 }
4179 continue; 4179 continue;
4180 } 4180 }
4181 4181
4182 smsg(_("/ line ignored in %s line %d: %s"), 4182 smsg(_("/ line ignored in %s line %ld: %s"),
4183 fname, lnum, line - 1); 4183 fname, lnum, line - 1);
4184 continue; 4184 continue;
4185 } 4185 }
4186 4186
4187 flags = 0; 4187 flags = 0;
4207 flags |= WF_REGION; 4207 flags |= WF_REGION;
4208 4208
4209 l = *p - '0'; 4209 l = *p - '0';
4210 if (l == 0 || l > spin->si_region_count) 4210 if (l == 0 || l > spin->si_region_count)
4211 { 4211 {
4212 smsg(_("Invalid region nr in %s line %d: %s"), 4212 smsg(_("Invalid region nr in %s line %ld: %s"),
4213 fname, lnum, p); 4213 fname, lnum, p);
4214 break; 4214 break;
4215 } 4215 }
4216 regionmask |= 1 << (l - 1); 4216 regionmask |= 1 << (l - 1);
4217 } 4217 }
4218 else 4218 else
4219 { 4219 {
4220 smsg(_("Unrecognized flags in %s line %d: %s"), 4220 smsg(_("Unrecognized flags in %s line %ld: %s"),
4221 fname, lnum, p); 4221 fname, lnum, p);
4222 break; 4222 break;
4223 } 4223 }
4224 ++p; 4224 ++p;
4225 } 4225 }