Skip to content

objint_longlong: Fix signed comparison error.#19058

Closed
jepler wants to merge 1 commit intomicropython:masterfrom
jepler:longlong-signed-comparison
Closed

objint_longlong: Fix signed comparison error.#19058
jepler wants to merge 1 commit intomicropython:masterfrom
jepler:longlong-signed-comparison

Conversation

@jepler
Copy link
Copy Markdown
Contributor

@jepler jepler commented Apr 8, 2026

Summary

Under afl-cc (acting as a wrapper for clang), the following diagnostic occurs (wrapped for clarity):

../../py/objint_longlong.c:232:32: error:
    comparison of integers of different signs:
    'long long' and 'unsigned long' [-Werror,-Wsign-compare]

Add a cast to silence it. The value is known statically to fit inside long long.

Testing

This change was previously tested as a part of #17814

Generative AI

I did not use generative AI tools when creating this PR.

Under `afl-cc` (acting as a wrapper for clang), the following
diagnostic occurs (wrapped for clarity):
```
../../py/objint_longlong.c:232:32: error:
    comparison of integers of different signs:
    'long long' and 'unsigned long' [-Werror,-Wsign-compare]
```

Add a cast to silence it. The value is known statically to fit inside
`long long`.

Signed-off-by: Jeff Epler <jepler@gmail.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Code size report:

Reference:  github: Ignore codecov upload failure on forks with no token set. [b0d2072]
Comparison: objint_longlong: Fix signed comparison error. [merge of 34b6b8e]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
      esp32:    +0 +0.000% ESP32_GENERIC
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.46%. Comparing base (b0d2072) to head (34b6b8e).
⚠️ Report is 22 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19058   +/-   ##
=======================================
  Coverage   98.46%   98.46%           
=======================================
  Files         176      176           
  Lines       22802    22802           
=======================================
  Hits        22453    22453           
  Misses        349      349           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dpgeorge dpgeorge added the py-core Relates to py/ directory in source label Apr 9, 2026
@dpgeorge
Copy link
Copy Markdown
Member

Rebased and merged in 02f2683

@dpgeorge dpgeorge closed this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

py-core Relates to py/ directory in source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants