Skip to content

Compiler warnings in objective_c.m #2776

@stuartmorgan-g

Description

@stuartmorgan-g
/Volumes/Work/s/w/ir/x/w/.pub-cache/hosted/pub.dev/objective_c-9.0.0+1/ios/Classes/../../src/objective_c.m:80:34: error: implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
   80 |   c_version.major = objc_version.majorVersion;
      |                   ~ ~~~~~~~~~~~~~^~~~~~~~~~~~
/Volumes/Work/s/w/ir/x/w/.pub-cache/hosted/pub.dev/objective_c-9.0.0+1/ios/Classes/../../src/objective_c.m:81:34: error: implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
   81 |   c_version.minor = objc_version.minorVersion;
      |                   ~ ~~~~~~~~~~~~~^~~~~~~~~~~~
/Volumes/Work/s/w/ir/x/w/.pub-cache/hosted/pub.dev/objective_c-9.0.0+1/ios/Classes/../../src/objective_c.m:82:34: error: implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
   82 |   c_version.patch = objc_version.patchVersion;
      |                   ~ ~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /Volumes/Work/s/w/ir/x/w/.pub-cache/hosted/pub.dev/objective_c-9.0.0+1/ios/Classes/objective_c.m:9:
/Volumes/Work/s/w/ir/x/w/.pub-cache/hosted/pub.dev/objective_c-9.0.0+1/ios/Classes/../../src/objective_c_bindings_generated.m:130:37: error: a block declaration without a prototype is deprecated  [-Werror,-Wstrict-prototypes]
  130 | typedef void  (^_ListenerTrampoline)();

As with #2482 this blocks CI in flutter/packages. It would be great if we could get Xcode analysis of the package into the in-repo CI so that these would be caught before publishing, as I'm concerned about OOB breakage in the future once we've landed the conversion of path_provider (until #1068 is done).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions