Skip to content

Commit

Permalink
Use &X[3] instead of X + 3 to fix clang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rootkea committed Sep 6, 2021
1 parent ca81123 commit aec0c38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parsers/lisp.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static int lisp_hint2kind (const vString *const hint)
int n;

/* 4 means strlen("(def"). */
#define EQN(X) strncmp(vStringValue (hint) + 4, X + 3, n) == 0
#define EQN(X) strncmp(vStringValue (hint) + 4, &X[3], n) == 0
switch (vStringLength (hint) - 4)
{
case 2:
Expand Down Expand Up @@ -155,7 +155,7 @@ static int elisp_hint2kind (const vString *const hint)
int n;

/* 4 means strlen("(def"). */
#define EQN(X) strncmp(vStringValue (hint) + 4, X + 3, n) == 0
#define EQN(X) strncmp(vStringValue (hint) + 4, &X[3], n) == 0
switch (vStringLength (hint) - 4)
{
case 2:
Expand Down

0 comments on commit aec0c38

Please sign in to comment.