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

cppcheck find bug #6

Open
RekGRpth opened this issue Nov 9, 2021 · 2 comments
Open

cppcheck find bug #6

RekGRpth opened this issue Nov 9, 2021 · 2 comments

Comments

@RekGRpth
Copy link
Contributor

RekGRpth commented Nov 9, 2021

dblink_plus/dblink_oracle.c:610:3: portability: Returning an integer in a function with pointer return type is not portable. [CastIntegerToAddressAtReturn]
  return false;
  ^
@RekGRpth
Copy link
Contributor Author

RekGRpth commented Nov 9, 2021

dblink_plus/dblink_oracle.c:371:10: style: Variable 'status' is reassigned a value before the old one has been used. [redundantAssignment]
  status = OCIAttrGet(hp, OCI_DTYPE_PARAM,
         ^
dblink_plus/dblink_oracle.c:369:10: note: status is assigned
  status = OCIParamGet(cur->stmt, OCI_HTYPE_STMT,
         ^
dblink_plus/dblink_oracle.c:371:10: note: status is overwritten
  status = OCIAttrGet(hp, OCI_DTYPE_PARAM,
         ^

@RekGRpth
Copy link
Contributor Author

RekGRpth commented Nov 9, 2021

dblink_plus/dblink.c:1295:14: style: Same expression on both sides of '-'. [duplicateExpression]
  return ptr - saveptr;
             ^
dblink_plus/dblink.c:1292:34: note: 'saveptr' is assigned value 'ptr' here.
  const unsigned char *saveptr = ptr;
                                 ^
dblink_plus/dblink.c:1295:14: note: Same expression on both sides of '-'.
  return ptr - saveptr;
             ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant