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

Fixes to pass VSCode Intellisence checks #175

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

kevsecurity
Copy link
Contributor

Often, the attribute((section())) statement was used with an extra
set of parentheses around the section name. This caused issues for
VSCode and resulted in the files being marked as having errors, making
it harder to spot actual errors.

This commit removes the extra parentheses. It also adds a #define for
'''__builtin_preserve_access_index()''' if VSCODE has been defined. This
allows developers to define VSCODE in their VSCODE C/C++ settings in
order to stop Intellisense complaining about the _(P) macro which is
used in probe_read() calls.

Signed-off-by: Kevin Sheldrake [email protected]

@kevsecurity kevsecurity requested a review from a team as a code owner June 16, 2022 11:40
@kevsecurity kevsecurity requested a review from willfindlay June 16, 2022 11:40
@kevsecurity kevsecurity force-pushed the pr/kevsecurity/vscode-fixes branch 2 times, most recently from 9e989d0 to 7a72a95 Compare June 16, 2022 11:49
Copy link
Contributor

@willfindlay willfindlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Kev, this all looks fine to me.

@kevsecurity
Copy link
Contributor Author

Thanks, Kev, this all looks fine to me.

Great, can you merge? I'm not authorized.

@willfindlay
Copy link
Contributor

@kevsecurity Actually one thing, maybe we should document the #ifdef VSCODE stuff somewhere as well as maybe add a comment in that file to explain what it's doing there?

@kevsecurity
Copy link
Contributor Author

@kevsecurity Actually one thing, maybe we should document the #ifdef VSCODE stuff somewhere as well as maybe add a comment in that file to explain what it's doing there?

Actually good point. The commit comment probably isn't sufficient. I'll do that and push.

Often, the attribute((section())) statement was used with an extra
set of parentheses around the section name. This caused issues for
VSCode and resulted in the files being marked as having errors, making
it harder to spot actual errors.

This commit removes the extra parentheses. It also adds a #define for
'''__builtin_preserve_access_index()''' if VSCODE has been defined. This
allows developers to define VSCODE in their VSCODE C/C++ settings in
order to stop Intellisense complaining about the _(P) macro which is
used in probe_read() calls.

Signed-off-by: Kevin Sheldrake <[email protected]>
@kevsecurity kevsecurity force-pushed the pr/kevsecurity/vscode-fixes branch from 7a72a95 to cda33da Compare June 16, 2022 13:41
Copy link
Contributor

@willfindlay willfindlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@willfindlay willfindlay merged commit 1d97d0f into main Jun 16, 2022
@willfindlay willfindlay deleted the pr/kevsecurity/vscode-fixes branch June 16, 2022 13:58
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

Successfully merging this pull request may close these issues.

2 participants