Skip to content

Commit

Permalink
Merge pull request #3764 from jafl/fix-compiler-warnings
Browse files Browse the repository at this point in the history
Fix compiler warnings
  • Loading branch information
jafl authored Jul 5, 2023
2 parents c0692dc + 3561c88 commit 71851a4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 17 deletions.
3 changes: 0 additions & 3 deletions main/lregex.c
Original file line number Diff line number Diff line change
Expand Up @@ -3749,8 +3749,6 @@ static EsObject* lrop_refN_scope (OptVM *vm, EsObject *name)

static EsObject* lrop_get_scope_depth (OptVM *vm, EsObject *name)
{
int n = 0;

struct lregexControlBlock *lcb = opt_vm_get_app_data (vm);
int scope = lcb->currentScope;

Expand All @@ -3761,7 +3759,6 @@ static EsObject* lrop_get_scope_depth (OptVM *vm, EsObject *name)
break;

scope = e->extensionFields.scopeIndex;
n++;
}

EsObject *q = es_integer_new (scope);
Expand Down
2 changes: 1 addition & 1 deletion main/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -2800,7 +2800,7 @@ extern bool ptagMakePatternLengthLimit (ptagDesc *pdesc, langType language CTAGS

static void setBooleanToXtagWithWarning(booleanOption *const option, bool value)
{
/* WARNING/TODO: This function breaks capsulization. */
/* WARNING/TODO: This function breaks encapsulation. */

char x = 0;

Expand Down
3 changes: 0 additions & 3 deletions parsers/flex.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ static void parseIdentifier (vString *const string, const int firstChar)
static void readTokenFull (tokenInfo *const token, bool include_newlines)
{
int c;
int i;
bool newline_encountered = false;

/* if we've got a token held back, emit it */
Expand All @@ -481,13 +480,11 @@ static void readTokenFull (tokenInfo *const token, bool include_newlines)
vStringClear (token->string);

getNextChar:
i = 0;
do
{
c = getcFromInputFile ();
if (include_newlines && (c == '\r' || c == '\n'))
newline_encountered = true;
i++;
}
while (c == '\t' || c == ' ' || c == '\r' || c == '\n');

Expand Down
11 changes: 1 addition & 10 deletions parsers/ocaml.c
Original file line number Diff line number Diff line change
Expand Up @@ -1338,25 +1338,16 @@ static void localLet (vString * const ident, ocaToken what, ocaToken whatNext)
* because their syntax is similar. */
static void matchPattern (vString * const ident, ocaToken what, ocaToken whatNext)
{
/* keep track of [], as it
* can be used in patterns and can
* mean the end of match expression in
* revised syntax */
static int braceCount = 0;

switch (what)
{
case Tok_To:
pushEmptyContext (&matchPattern);
toDoNext = &mayRedeclare;
break;

case Tok_BRL:
braceCount++;
break;

case OcaKEYWORD_value:
popLastNamed ();
// fall through
case OcaKEYWORD_and:
case OcaKEYWORD_end:
// why was this global? matches only make sense in local scope
Expand Down

0 comments on commit 71851a4

Please sign in to comment.