Skip to content

Consider API change to deal with compiler warnings around array slices #123

Description

@humphrey-xmos

lib_device_control uses function parameters such as client interface control i_control[], which generates warnings...

​warning: argument 2 of `i2c_client' slices interface preventing analysis of its parallel usage [-Wunusual-code]

I take it these warnings are not very significant as much of the code uses pragmas to silence them, is that correct?

Consider

  • adding an optional config header with a variable such as NUM_CONTROL_INTERFACES
  • and updating the API to client interface control i_control[NUM_CONTROL_INTERFACES]
  • removing the 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