Skip to content

Commit

Permalink
Merge pull request #124 from thbeu/fix-cppcheck-issues
Browse files Browse the repository at this point in the history
Fix issues reported by cppcheck 2.13.0
  • Loading branch information
rouault authored Mar 25, 2024
2 parents f04a4b3 + 4a0fb2d commit 2b0c097
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions dbfopen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2146,7 +2146,6 @@ int SHPAPI_CALL DBFAlterFieldDefn(DBFHandle psDBF, int iField,
char *pszOldField =
STATIC_CAST(char *, malloc(sizeof(char) * (nOldWidth + 1)));

/* cppcheck-suppress uninitdata */
pszOldField[nOldWidth] = 0;

/* move records to their new positions */
Expand Down Expand Up @@ -2224,7 +2223,6 @@ int SHPAPI_CALL DBFAlterFieldDefn(DBFHandle psDBF, int iField,
char *pszOldField =
STATIC_CAST(char *, malloc(sizeof(char) * (nOldWidth + 1)));

/* cppcheck-suppress uninitdata */
pszOldField[nOldWidth] = 0;

/* move records to their new positions */
Expand Down
3 changes: 1 addition & 2 deletions shpopen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,8 +1244,7 @@ SHPObject SHPAPI_CALL1(*)
psObject->panPartType[i] = SHPP_RING;
}

if (psObject->panPartStart[0] != 0)
psObject->panPartStart[0] = 0;
psObject->panPartStart[0] = 0;
}

/* -------------------------------------------------------------------- */
Expand Down

0 comments on commit 2b0c097

Please sign in to comment.