Skip to content

Commit

Permalink
ReStructuredText: avoid signed/unsigned mismatch
Browse files Browse the repository at this point in the history
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed May 8, 2023
1 parent 3d009df commit ce00746
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions parsers/rst.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ static void shiftKinds(int shift, rstKind baseKind)
hashPtreq, NULL, NULL);
hashTableSetValueForUnknownKey(remapping_table, HT_INT_TO_PTR(CORK_NIL), NULL);

for (int index = 0; index < count; index++)
for (size_t index = 0; index < count; index++)
{
tagEntryInfo *e = getEntryInCorkQueue(index);
tagEntryInfo *e = getEntryInCorkQueue((int)index);
if (e && (baseKind <= e->kindIndex && e->kindIndex < SECTION_COUNT))
{
e->kindIndex += shift;
Expand All @@ -369,9 +369,9 @@ static void shiftKinds(int shift, rstKind baseKind)
}
}

for (int index = 0; index < count; index++)
for (size_t index = 0; index < count; index++)
{
tagEntryInfo *e = getEntryInCorkQueue(index);
tagEntryInfo *e = getEntryInCorkQueue((int)index);
if (e && e->extensionFields.scopeIndex != CORK_NIL)
{
void *remapping_to = hashTableGetItem (remapping_table,
Expand Down Expand Up @@ -424,9 +424,9 @@ static void inlineScopes (void)
+Subsubsection 1.1.1.1 input.rst /^Subsubsection 1.1.1.1$/;" t subsection:Chapter 1.Section 1.1.Subsection 1.1.1
*/
size_t count = countEntryInCorkQueue();
for (int index = 0; index < count; index++)
for (size_t index = 0; index < count; index++)
{
tagEntryInfo *e = getEntryInCorkQueue(index);
tagEntryInfo *e = getEntryInCorkQueue((int)index);

if (e && e->extensionFields.scopeIndex != CORK_NIL)
inlineTagScope(e, e->extensionFields.scopeIndex);
Expand Down

0 comments on commit ce00746

Please sign in to comment.