Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings #3764

Merged
merged 2 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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