Skip to content

Unused variables and signed-unsigned comparisons #110

Description

@martin-ueding

I just turned on some warnings in order to get some better information to track down the build failure on Travis CI regarding the new twisted mass code. The build output is now littered with two types of warnings:

  1. There are lots of undefined variables. It seems that in the index calculations we don't actually need all that stuff. In order to make the code easier to refactor when we implement multiple communication strategies, I would like to remove those variables.

  2. Comparison between signed and unsigned integers. Unfortunately (Stroustup or Sutter have said that) the standard library uses a lot of unsigned integers. Therefore we can either also used unsigned integers in those cases, explicitly cast, or just ignore those warnings. I would assume that just using signed numbers will not do us any harm. The overflow is undefined (contrary to unsigned integers, where it is well defined), but we are not relying on that. So I would assume that one could change our variables to signed.

I think that the first one could be worthwhile, the second might not be that interesting to fix.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions