Kaydet (Commit) 457658dc authored tarafından Jiří Techet's avatar Jiří Techet

Avoid warnings about unused variables in rest and asciidoc parsers

We don't use the return value of getNestingLevel(), only its
nestingLevelsPop() semantics. Get rid of the return value and rename the
function to avoid confusion.
üst 66a08f65
...@@ -52,7 +52,7 @@ static NestingLevels *nestingLevels = NULL; ...@@ -52,7 +52,7 @@ static NestingLevels *nestingLevels = NULL;
* FUNCTION DEFINITIONS * FUNCTION DEFINITIONS
*/ */
static NestingLevel *getNestingLevel(const int kind) static void popNestingLevelToKind(const int kind)
{ {
NestingLevel *nl; NestingLevel *nl;
tagEntryInfo *e; tagEntryInfo *e;
...@@ -66,17 +66,16 @@ static NestingLevel *getNestingLevel(const int kind) ...@@ -66,17 +66,16 @@ static NestingLevel *getNestingLevel(const int kind)
else else
break; break;
} }
return nl;
} }
static void makeAsciidocTag (const vString* const name, const int kind) static void makeAsciidocTag (const vString* const name, const int kind)
{ {
const NestingLevel *const nl = getNestingLevel(kind);
int r = CORK_NIL; int r = CORK_NIL;
popNestingLevelToKind(kind);
if (vStringLength (name) > 0) if (vStringLength (name) > 0)
{ {
tagEntryInfo *parent = getEntryOfNestingLevel (nl);
tagEntryInfo e; tagEntryInfo e;
initTagEntry (&e, vStringValue (name), &(AsciidocKinds [kind])); initTagEntry (&e, vStringValue (name), &(AsciidocKinds [kind]));
......
...@@ -49,7 +49,7 @@ static NestingLevels *nestingLevels = NULL; ...@@ -49,7 +49,7 @@ static NestingLevels *nestingLevels = NULL;
* FUNCTION DEFINITIONS * FUNCTION DEFINITIONS
*/ */
static NestingLevel *getNestingLevel(const int kind) static void popNestingLevelToKind(const int kind)
{ {
NestingLevel *nl; NestingLevel *nl;
tagEntryInfo *e; tagEntryInfo *e;
...@@ -63,17 +63,16 @@ static NestingLevel *getNestingLevel(const int kind) ...@@ -63,17 +63,16 @@ static NestingLevel *getNestingLevel(const int kind)
else else
break; break;
} }
return nl;
} }
static void makeRestTag (const vString* const name, const int kind) static void makeRestTag (const vString* const name, const int kind)
{ {
const NestingLevel *const nl = getNestingLevel(kind);
int r = CORK_NIL; int r = CORK_NIL;
popNestingLevelToKind(kind);
if (vStringLength (name) > 0) if (vStringLength (name) > 0)
{ {
tagEntryInfo *parent = getEntryOfNestingLevel (nl);
tagEntryInfo e; tagEntryInfo e;
initTagEntry (&e, vStringValue (name), &(RestKinds [kind])); initTagEntry (&e, vStringValue (name), &(RestKinds [kind]));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment