-
Notifications
You must be signed in to change notification settings - Fork 22
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
Refactor "Compiled-out" code (ifdef) #69
Labels
Milestone
Comments
jphickey
added a commit
to jphickey/HS
that referenced
this issue
Feb 22, 2023
Do not conditionally compile code based on HS_MAX_EXEC_CNT_SLOTS being 0. It will now be required that the option is >0. Note that a configuration of 0 was not being tested/validated, so this removes an untested option.
2 tasks
jphickey
added a commit
to jphickey/HS
that referenced
this issue
Feb 22, 2023
Do not conditionally compile code based on HS_MAX_EXEC_CNT_SLOTS being 0. It will now be required that the option is >0. Note that a configuration of 0 was not being tested/validated, so this removes an untested option.
jphickey
added a commit
to jphickey/HS
that referenced
this issue
Feb 22, 2023
Do not conditionally compile code based on HS_MAX_EXEC_CNT_SLOTS being 0. It will now be required that the option is >0. Note that a configuration of 0 was not being tested/validated, so this removes an untested option.
jphickey
added a commit
to jphickey/HS
that referenced
this issue
Feb 22, 2023
Do not conditionally compile code based on HS_MAX_EXEC_CNT_SLOTS being 0. It will now be required that the option is >0. Note that a configuration of 0 was not being tested/validated, so this removes an untested option.
jphickey
added a commit
to jphickey/HS
that referenced
this issue
Feb 23, 2023
Do not conditionally compile code based on HS_MAX_EXEC_CNT_SLOTS being 0. It will now be required that the option is >0. Note that a configuration of 0 was not being tested/validated, so this removes an untested option.
jphickey
added a commit
to jphickey/HS
that referenced
this issue
Feb 23, 2023
Do not conditionally compile code based on HS_MAX_EXEC_CNT_SLOTS being 0. It will now be required that the option is >0. Note that a configuration of 0 was not being tested/validated, so this removes an untested option.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist (Please check before submitting)
Describe the bug
HS contains a significant amount of code that can be compiled-out via
#if HS_MAX_EXEC_CNT_SLOTS != 0
To comply with coding standards this should be refactored so it does not need to be compiled out.
To Reproduce
N/A
Expected behavior
Should not remove entire functions via
#if
as this can negatively affect unit testing. Switches like this increases the testing permutations required - technically should test it both ways, but we are not currently doing so.System observed on:
N/A
Additional context
In this case the default value of HS_MAX_EXEC_CNT_SLOTS is 32, so this is compiled-in by default, but we never actually test the compiled-out option to see if it works correctly.
Requirement for this feature should be revisited first (i.e. is there a reason why we really need to have the option to set HS_MAX_EXEC_CNT_SLOTS to 0, as other configurable parameters do not have such an option).
If it is required to compile this out entirely, then a source-selection would be preferable over chunks of
#if
code.Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: