Skip to content

Compilation Warnings and Their Fixes #97

Description

@lior8

There are multiple compilation warnings in the codebase and I want to try to tackle a few of them. Therefore I have a few questions:

  1. Mismatched Types Compilation Errors
    There are quite a few compilation warnings that relate to mismatched return or comparison types.
    For example "int i" instead of "size_t i", which indeed should be size_t i.
    But there are places where it is less obvious, for example unsigned int to int and vice versa. I was thinking of trying to figure out what would be the true appropriate type for them, but I am afraid of it breaking in certain edge cases. Would simple casting be appropriate here or is the former approach preferable?
  2. Unused static functions
    I saw that inlining them can fix it, or instead removing the warning for unusued fuctions in the flags for compilation. Is there a preferred approach? I think adding "inline" to them can solve the problem.
  3. #pragma mark
    Is this being used for something? I am compiling with GCC 9.4.0 and I get the following warning: "ignoring #pragma mark [-Wunknown-pragmas]"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions