Skip to content

Commit aec0a1d

Browse files
committed
main: use unsiged int as the return type of countFields
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent 20fabfd commit aec0a1d

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

main/field.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ extern bool doesFieldHaveRenderer (fieldType type, bool noEscaping)
12851285
return getFieldObject(type)->def->render? true: false;
12861286
}
12871287

1288-
extern int countFields (void)
1288+
extern unsigned int countFields (void)
12891289
{
12901290
return fieldObjectUsed;
12911291
}

main/field_p.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ extern const char* renderFieldNoEscaping (fieldType type, const tagEntryInfo *ta
6464
extern bool doesFieldHaveTabOrNewlineChar (fieldType type, const tagEntryInfo *tag, int index);
6565

6666
extern void initFieldObjects (void);
67-
extern int countFields (void);
67+
extern unsigned int countFields (void);
6868

6969
/* language should be typed to langType.
7070
Use int here to avoid circular dependency */

main/options.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,9 +1345,7 @@ static void processExtraTagsOption (
13451345

13461346
static void resetFieldsOption (langType lang, bool mode)
13471347
{
1348-
int i;
1349-
1350-
for (i = 0; i < countFields (); ++i)
1348+
for (unsigned int i = 0; i < countFields (); ++i)
13511349
if ((lang == LANG_AUTO) || (lang == getFieldOwner (i)))
13521350
enableField (i, mode);
13531351

main/parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4945,7 +4945,7 @@ extern bool makeFieldDescriptionsPseudoTags (const langType language,
49454945
const ptagDesc *pdesc)
49464946
{
49474947
bool written = false;
4948-
for (int i = 0; i < countFields (); i++)
4948+
for (unsigned int i = 0; i < countFields (); i++)
49494949
{
49504950
if (getFieldOwner (i) == language
49514951
&& isFieldEnabled (i))

0 commit comments

Comments
 (0)