8000 Fix qemu_firmware build warnings by agren · Pull Request #355 · tillitis/tillitis-key1 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix qemu_firmware build warnings #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2025
Merged

Fix qemu_firmware build warnings #355

merged 1 commit into from
Jun 19, 2025

Conversation

agren
Copy link
Member
@agren agren commented Jun 2, 2025

Description

Building qemu_firmware.bin:

cd contrib
make run
cd hw/application_fpga
make clean_fw
make qemu_firmware.elf

Produce the following warnings:

/build/hw/application_fpga/fw/tk1/main.c:452:16: warning: passing 'volatile uint8_t[32]' (aka 'volatile unsigned char[32]') to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  452 |         debug_hexdump(resetinfo->app_digest, RESET_DIGEST_SIZE);
      |                       ^~~~~~~~~~~~~~~~~~~~~
tkey-libs/include/tkey/debug.h:17:50: note: expanded from macro 'debug_hexdump'
   17 | #define debug_hexdump(buf, len) hexdump(IO_QEMU, buf, len)
      |                                                  ^~~
tkey-libs/include/tkey/io.h:39:37: note: passing argument to parameter 'buf' here
   39 | void hexdump(enum ioend dest, void *buf, int len);
      |                                     ^
/build/hw/application_fpga/fw/tk1/main.c:456:16: warning: passing 'volatile uint8_t[220]' (aka 'volatile unsigned char[220]') to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  456 |         debug_hexdump(resetinfo->next_app_data, RESET_DATA_SIZE);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~
tkey-libs/include/tkey/debug.h:17:50: note: expanded from macro 'debug_hexdump'
   17 | #define debug_hexdump(buf, len) hexdump(IO_QEMU, buf, len)
      |                                                  ^~~
tkey-libs/include/tkey/io.h:39:37: note: passing argument to parameter 'buf' here
   39 | void hexdump(enum ioend dest, void *buf, int len);
      |                                     ^

This PR fixes the warnings.

Type of change

  • Bugfix (non breaking change which resolve an issue)

Submission checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my changes
  • I have tested and verified my changes on target
  • My changes are well written and CI is passing
  • I have squashed my work to relevant commits and rebased on main for linear history
  • I have added a "Co-authored-by: x" if several people contributed, either pair programming or by squashing commits from different authors.
  • I have updated the documentation where relevant (readme, dev.tillitis.se etc.)
  • QEMU is updated to reflect changes

@agren agren requested review from mchack-work and jthornblad June 2, 2025 11:58
@agren agren force-pushed the fix-qemu-firmware-warnings branch from f1f1d3a to 256904f Compare June 2, 2025 12:11
@agren agren marked this pull request as ready for review June 2, 2025 12:20
Copy link
Member
@mchack-work mchack-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Also tested by running signer on it.

@agren agren force-pushed the fix-qemu-firmware-warnings branch from 256904f to 460d310 Compare June 19, 2025 06:51
@agren
Copy link
Member Author
agren commented Jun 19, 2025

Rebased on main

@agren agren merged commit 460d310 into main Jun 19, 2025
6 checks passed
@agren agren deleted the fix-qemu-firmware-warnings branch June 19, 2025 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0