Skip to content

Conversation

hramrach
Copy link
Contributor

@hramrach hramrach commented Nov 4, 2024

The bulk of the warnings is signed vs unsigned comparison.

While this is dodgy because there is no clear semantic for such comparison the warning is not all that helpful in itself.

A value can be automatically promoted between signed and unsigned when passed as function argument, for example.

The documentation sttes that the element size should come second but
it's passed first.

Signed-off-by: Michal Suchanek <[email protected]>
There is no point to it being signed other than the trick of negating to
record removal.

It is compared to unsigned values in a number of places leading to a
warning.

Signed-off-by: Michal Suchanek <[email protected]>
output_level is compared to say_level enumeration values which are all
non-negative, making the enumeration type unsigned. This comparison
triggers a warning.

Signed-off-by: Michal Suchanek <[email protected]>
Property size is compared with file size returned from the stat() call
which is signed.

Signed-off-by: Michal Suchanek <[email protected]>
The structures that store nid values store them as unsigned, causing
different signedness comparison warnings.

Signed-off-by: Michal Suchanek <[email protected]>
Signed-off-by: Michal Suchanek <[email protected]>
The token value is comparted to an unsigned value, and the string
representation is assumed to start with a number, not a sign.

Signed-off-by: Michal Suchanek <[email protected]>
They are compared to an unsigned value causing a different sign
comparison warning.

These start from zero and only increase, there is no use for negative
values.

Signed-off-by: Michal Suchanek <[email protected]>
This avoids different signedness warning.

Signed-off-by: Michal Suchanek <[email protected]>
Signed-off-by: Michal Suchanek <[email protected]>
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.

1 participant