Skip to content

Conversation

@dpgeorge
Copy link
Member

Summary

Windows mingw CI is failing due to compiler warnings. This PR attempts to fix that.

Testing

Done by CI.

@dpgeorge dpgeorge added the py-core Relates to py/ directory in source label Apr 30, 2025
@dpgeorge dpgeorge force-pushed the py-emitinlinethumb-fix-char-warnings branch from faafb2c to a9152e9 Compare April 30, 2025 01:33
@codecov
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.54%. Comparing base (f9a755c) to head (9735188).
Report is 33 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #17215   +/-   ##
=======================================
  Coverage   98.54%   98.54%           
=======================================
  Files         169      169           
  Lines       21890    21890           
=======================================
  Hits        21572    21572           
  Misses        318      318           

☔ 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 force-pushed the py-emitinlinethumb-fix-char-warnings branch from a9152e9 to 0af6f58 Compare April 30, 2025 01:46
@github-actions
Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     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

@dpgeorge dpgeorge changed the title py/emitinlinethumb: Use explicit cast to fix compiler warnings. py/emitinlinethumb: Use nonstring attribute to suppress compiler warnings Apr 30, 2025
@dpgeorge dpgeorge requested a review from projectgus April 30, 2025 01:57
To suppress compiler warnings about truncated null character when
initializing these fields.

Signed-off-by: Damien George <[email protected]>
@dpgeorge dpgeorge force-pushed the py-emitinlinethumb-fix-char-warnings branch from 0af6f58 to 9735188 Compare April 30, 2025 02:51
@dpgeorge
Copy link
Member Author

dpgeorge commented May 1, 2025

I forgot about #16692, but this PR should fix that issue.

@dpgeorge
Copy link
Member Author

dpgeorge commented May 1, 2025

Should probably also fix the two cases in extmod/moductypes.c as well.

@DvdGiessen
Copy link
Contributor

DvdGiessen commented May 6, 2025

Note: In addition to moductypes the warning is also raised in the code of LittleFS version 1, which blocks the Unix port build for me:

../../lib/littlefs/lfs1.c: In function ‘lfs1_format’:
../../lib/littlefs/lfs1.c:2144:24: error: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (9 chars into 8 available) [-Werror=unterminated-string-initialization]
 2144 |             .d.magic = {"littlefs"},
      |                        ^

Since that version isn't getting updates anymore (all development is now happening on version 2, the last release of version 1 was over 6 years ago), I think we can safely patch it.

@dpgeorge
Copy link
Member Author

dpgeorge commented May 9, 2025

Closing in favour of #17269.

@dpgeorge dpgeorge closed this May 9, 2025
@dpgeorge dpgeorge deleted the py-emitinlinethumb-fix-char-warnings branch May 9, 2025 04:48
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.

4 participants