Skip to content

Checked-c-convert: function parameter renamed #527

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

Closed
secure-sw-dev-bot opened this issue Jan 16, 2022 · 2 comments
Closed

Checked-c-convert: function parameter renamed #527

secure-sw-dev-bot opened this issue Jan 16, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@secure-sw-dev-bot
Copy link

This issue was copied from checkedc/checkedc-clang#528


Several function parameters named "ix" are renamed to "i" by checked-c-convert, but just in the parameter list, not in the function body. This means there's no declaration for the uses of "ix" in the function body and no use of the renamed parameter "i".

Example: parson.checked.c:1542
Original code: parson.c:1542
Error Produced: use of undeclared identifier 'ix'. There is also a warning for unused parameter 'i'

To use this test case:

  • Clone https://github.com/AnnaKornfeldSimpson/parson
  • Check out the snapshotWeUse branch
  • make test to build the original code. make testchecked to build with the copies produced by checked-c-convert.
  • convert.sh runs checked-c-convert on the original code and outputs to *checked* files. If you re-run it, also edit parson.checked.c to use parson.checked.h. convert.sh may need modifications to run in Windows.
  • Compiler errors can be compared with compilerErrors.txt (produced on a Ubuntu system, not sure if it will perfectly match in Windows)
@secure-sw-dev-bot secure-sw-dev-bot added the bug Something isn't working label Jan 16, 2022
@secure-sw-dev-bot
Copy link
Author

Comment from @awruef:

I have a suspicion that I fixed this in a previous PR without knowing, I tried to reproduce now and it did the right thing. I'll investigate more.

@secure-sw-dev-bot
Copy link
Author

Comment from @dtarditi:

The convert tool has been mostly rewritten (see PR #642). Please reopen this issue if it still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant