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

Issue 10/correcting compilation warnings #24

Merged
merged 7 commits into from
May 27, 2021

Conversation

diseraluca
Copy link
Owner

Resolves #10.

  • The modular bitfield crate produces an unneccesary braces warning when From
    implementations are generated.

    See: Remove the unnecessary braces around From implementations. Robbepop/modular-bitfield#66

    A pull request ( Removes the unused braces warning in the autogenerated From implementations. Robbepop/modular-bitfield#68 ) to
    resolve this was provided.

    Since it is not yet accepted mainstream, the modular-bitfield dependency was
    temporarily moved to a custom fork to move forward with the removal of
    compilation warnings.

  • Previously, Buildup calculated the crc by digesting data as it was used.
    For this reason, it contained a crc field to keep track of it.

    This was later changed to reduce the state that was kept during a Buildup,
    calculating it in place when the last frame of a transfer and its crc are met.

    The previous code was only commented out and the field containing the crc was
    kept, producing a dead code warning.

    The crc field is now removed from Buildup, and the commented code that
    referred to it was removed.

  • The modular-bitfield crate, by default, generates a series of getters and
    setters method for each field.

    When those are unused, a dead code warning is produced.

    To avoid the warnings, appropriate #[skip] attributes for the field of
    various structures were added.

The modular bitfield crate produces an unneccesary braces warning when `From`
implementations are generated.

See: Robbepop/modular-bitfield#66

A pull request ( Robbepop/modular-bitfield#68 ) to
resolve this was provided.

Since it is not yet accepted mainstream, the `modular-bitfield` dependency was
temporarily moved to a custom fork to move forward with the removal of
compilation warnings.
Previously, `Buildup` calculated the crc by digesting data as it was used.
For this reason, it contained a crc field to keep track of it.

This was later changed to reduce the state that was kept during a `Buildup`,
calculating it in place when the last frame of a transfer and its crc are met.

The previous code was only commented out and the field containing the crc was
kept, producing a dead code warning.

The `crc` field is now removed from `Buildup`, and the commented code that
referred to it was removed.
The `modular-bitfield` crate, by default, generates a series of getters and
setters method for each field.

When those are unused, a dead code warning is produced.

To avoid the warnings, appropriate `#[skip]` attributes for the field of
`MessageSessionId` were added.
The `modular-bitfield` crate, by default, generates a series of getters and
setters method for each field.

When those are unused, a dead code warning is produced.

To avoid the warnings, appropriate `#[skip]` attributes for the field of
`NodeId` were added.
The `modular-bitfield` crate, by default, generates a series of getters and
setters method for each field.

When those are unused, a dead code warning is produced.

To avoid the warnings, appropriate `#[skip]` attributes for the field of
`ServiceSessionId` were added.
The `modular-bitfield` crate, by default, generates a series of getters and
setters method for each field.

When those are unused, a dead code warning is produced.

To avoid the warnings, appropriate `#[skip]` attributes for the field of
`ServiceId` were added.
The `modular-bitfield` crate, by default, generates a series of getters and
setters method for each field.

When those are unused, a dead code warning is produced.

To avoid the warnings, appropriate `#[skip]` attributes for the field of
`SubjectId` were added.
@diseraluca diseraluca self-assigned this May 27, 2021
@diseraluca diseraluca merged commit 4b6f8c2 into main May 27, 2021
@diseraluca diseraluca deleted the issue_10/correcting_compilation_warnings branch June 29, 2021 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Correct the compilation warnings
1 participant