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

Variables declared mid-function #109

Closed
jphickey opened this issue Dec 9, 2021 · 2 comments · Fixed by #333
Closed

Variables declared mid-function #109

jphickey opened this issue Dec 9, 2021 · 2 comments · Fixed by #333
Milestone

Comments

@jphickey
Copy link
Contributor

jphickey commented Dec 9, 2021

According to many coding standards (GSFC FSW included, AFAIK), variables should not be declared only at the top of functions, not in the middle. However, CF has many cases of this.

Any variables declared mid-function should be moved to the top of the function to correct this.

@jphickey
Copy link
Contributor Author

jphickey commented Dec 9, 2021

This was originally noted in #42 but split to a separate work item

@thnkslprpt
Copy link
Contributor

I had a look at this and made a first pass.

thnkslprpt added a commit to thnkslprpt/CF that referenced this issue Oct 13, 2022
thnkslprpt added a commit to thnkslprpt/CF that referenced this issue Oct 13, 2022
thnkslprpt added a commit to thnkslprpt/CF that referenced this issue Oct 20, 2022
thnkslprpt added a commit to thnkslprpt/CF that referenced this issue Oct 21, 2022
thnkslprpt added a commit to thnkslprpt/CF that referenced this issue Oct 27, 2022
thnkslprpt added a commit to thnkslprpt/CF that referenced this issue Dec 26, 2022
commit 4e1bb97
Author: Avi Weiss <[email protected]>
Date:   Mon Dec 26 16:14:26 2022 +1100

    Typo from merge from main

commit 57ab176
Merge: e151abd 8368adc
Author: Avi <[email protected]>
Date:   Mon Dec 26 15:16:21 2022 +1100

    Merge branch 'main' into fix-109-variable-declarations

commit e151abd
Author: Avi <[email protected]>
Date:   Thu Oct 13 18:34:51 2022 +1000

    Fix nasa#109, Move variables declared mid-function to the top
thnkslprpt added a commit to thnkslprpt/CF that referenced this issue Dec 26, 2022
commit 4e1bb97
Author: Avi Weiss <[email protected]>
Date:   Mon Dec 26 16:14:26 2022 +1100

    Typo from merge from main

commit 57ab176
Merge: e151abd 8368adc
Author: Avi <[email protected]>
Date:   Mon Dec 26 15:16:21 2022 +1100

    Merge branch 'main' into fix-109-variable-declarations

commit e151abd
Author: Avi <[email protected]>
Date:   Thu Oct 13 18:34:51 2022 +1000

    Fix nasa#109, Move variables declared mid-function to the top
dzbaker added a commit that referenced this issue Mar 9, 2023
Fix #109, Move variables declared mid-function to the top
thnkslprpt added a commit to thnkslprpt/CF that referenced this issue Mar 9, 2023
commit 3454b3501d05c1e538a9068572b70d2ba35329f3
Author: Avi <[email protected]>
Date:   Fri Mar 10 09:32:15 2023 +1000

    Fix nasa#105, Remove 'dummy' from variable names

commit e18bde9
Merge: 8fb8d9c cb2977c
Author: Avi <[email protected]>
Date:   Fri Mar 10 08:41:21 2023 +1000

    Merge branch 'main' into fix-105-remove-dummy-from-variable-names

commit cb2977c
Merge: 4ce1aa9 3444ff4
Author: dzbaker <[email protected]>
Date:   Thu Mar 9 15:23:53 2023 -0500

    Merge pull request nasa#366 from thnkslprpt/fix-365-remove-extraneous-assignments

    Fix nasa#365, Remove extraneous assignments to CFE_SUCCESS

commit 4ce1aa9
Merge: c44e372 dec4440
Author: dzbaker <[email protected]>
Date:   Thu Mar 9 15:20:08 2023 -0500

    Merge pull request nasa#333 from thnkslprpt/fix-109-variable-declarations

    Fix nasa#109, Move variables declared mid-function to the top

commit 8fb8d9c
Author: Avi <[email protected]>
Date:   Thu Feb 23 12:45:59 2023 +1000

    Fix nasa#105, Remove 'dummy' from variable names

commit 3444ff4
Author: Avi <[email protected]>
Date:   Thu Feb 16 10:39:06 2023 +1000

    Fix nasa#365, Remove extraneous assignments to CFE_SUCCESS

commit dec4440
Author: Avi Weiss <[email protected]>
Date:   Mon Dec 26 16:23:48 2022 +1100

    Fix nasa#109, Move variables declared mid-function to the top

    commit 4e1bb97
    Author: Avi Weiss <[email protected]>
    Date:   Mon Dec 26 16:14:26 2022 +1100

        Typo from merge from main

    commit 57ab176
    Merge: e151abd 8368adc
    Author: Avi <[email protected]>
    Date:   Mon Dec 26 15:16:21 2022 +1100

        Merge branch 'main' into fix-109-variable-declarations

    commit e151abd
    Author: Avi <[email protected]>
    Date:   Thu Oct 13 18:34:51 2022 +1000

        Fix nasa#109, Move variables declared mid-function to the top
thnkslprpt added a commit to thnkslprpt/CF that referenced this issue Mar 10, 2023
commit 4ef9460
Author: Avi <[email protected]>
Date:   Fri Mar 10 10:10:40 2023 +1000

    Formatting

commit e18bde9
Merge: 8fb8d9c cb2977c
Author: Avi <[email protected]>
Date:   Fri Mar 10 08:41:21 2023 +1000

    Merge branch 'main' into fix-105-remove-dummy-from-variable-names

commit cb2977c
Merge: 4ce1aa9 3444ff4
Author: dzbaker <[email protected]>
Date:   Thu Mar 9 15:23:53 2023 -0500

    Merge pull request nasa#366 from thnkslprpt/fix-365-remove-extraneous-assignments

    Fix nasa#365, Remove extraneous assignments to CFE_SUCCESS

commit 4ce1aa9
Merge: c44e372 dec4440
Author: dzbaker <[email protected]>
Date:   Thu Mar 9 15:20:08 2023 -0500

    Merge pull request nasa#333 from thnkslprpt/fix-109-variable-declarations

    Fix nasa#109, Move variables declared mid-function to the top

commit 8fb8d9c
Author: Avi <[email protected]>
Date:   Thu Feb 23 12:45:59 2023 +1000

    Fix nasa#105, Remove 'dummy' from variable names

commit 3444ff4
Author: Avi <[email protected]>
Date:   Thu Feb 16 10:39:06 2023 +1000

    Fix nasa#365, Remove extraneous assignments to CFE_SUCCESS

commit dec4440
Author: Avi Weiss <[email protected]>
Date:   Mon Dec 26 16:23:48 2022 +1100

    Fix nasa#109, Move variables declared mid-function to the top

    commit 4e1bb97
    Author: Avi Weiss <[email protected]>
    Date:   Mon Dec 26 16:14:26 2022 +1100

        Typo from merge from main

    commit 57ab176
    Merge: e151abd 8368adc
    Author: Avi <[email protected]>
    Date:   Mon Dec 26 15:16:21 2022 +1100

        Merge branch 'main' into fix-109-variable-declarations

    commit e151abd
    Author: Avi <[email protected]>
    Date:   Thu Oct 13 18:34:51 2022 +1000

        Fix nasa#109, Move variables declared mid-function to the top
@chillfig chillfig added this to the Equuleus milestone Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants