Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@kjlubick
Copy link
Contributor

Related to #127701

When landing a seemingly unrelated CL, clang-tidy started failing with:

❌ Failures for clang-tidy on /b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:
/b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:57:10: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
  return images_[image_index].frame_info.value();
         ^
/b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:154:13: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
    switch (frame.frame_info->blend_mode) {
            ^
/b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:526:7: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
  if (images_.back().frame_info->disposal_method ==
      ^
/b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:535:7: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
      images_.back().frame_info->disposal_method ==
      ^
/b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:538:5: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
    image->frame_info->required_frame = images_.size() - 1;
    ^
Suppressed 1772 warnings (1772 in non-user code).

This addresses those checks by making sure frame_info has a value.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@kjlubick kjlubick marked this pull request as ready for review May 31, 2023 14:05
@kjlubick kjlubick requested a review from zanderso May 31, 2023 14:06
@zanderso zanderso requested a review from bdero May 31, 2023 15:56
@zanderso zanderso merged commit dda0e47 into flutter:main May 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 31, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 31, 2023
andrewkolos pushed a commit to andrewkolos/flutter that referenced this pull request May 31, 2023
@kjlubick kjlubick deleted the lint-apng branch August 3, 2023 18:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants