Skip to content

Fix incompatible pointer type in Windows code#29

Open
illwieckz wants to merge 1 commit into
masterfrom
illwieckz/incompatible-pointers
Open

Fix incompatible pointer type in Windows code#29
illwieckz wants to merge 1 commit into
masterfrom
illwieckz/incompatible-pointers

Conversation

@illwieckz

Copy link
Copy Markdown
Member

Fixes:

nacl_host_dir.c:43:30: error: passing argument 1 of 'FindFirstFileA' from incompatible pointer type [-Wincompatible-pointer-types]
   43 |   d->handle = FindFirstFile(d->pattern, &d->find_data);
      |                             ~^~~~~~~~~
      |                              |
      |                              wchar_t * {aka short unsigned int *}

nacl_host_dir.c:220:34: error: passing argument 2 of 'FindNextFileA' from incompatible pointer type [-Wincompatible-pointer-types]
  220 |     if (!FindNextFile(d->handle, &d->find_data)) {
      |                                  ^~~~~~~~~~~~~
      |                                  |
      |                                  WIN32_FIND_DATAW *

I reproduced it with MinGW from Debian 13.2 Trixie.
I didn't reproduced it with MinGW from Ubuntu 24.04.4 Noble.

I noticed it while working on implementing the NaCl loader build in Dæmon's external deps:

Fixes:

nacl_host_dir.c:43:30: error: passing argument 1 of 'FindFirstFileA' from incompatible pointer type [-Wincompatible-pointer-types]
   43 |   d->handle = FindFirstFile(d->pattern, &d->find_data);
      |                             ~^~~~~~~~~
      |                              |
      |                              wchar_t * {aka short unsigned int *}

nacl_host_dir.c:220:34: error: passing argument 2 of 'FindNextFileA' from incompatible pointer type [-Wincompatible-pointer-types]
  220 |     if (!FindNextFile(d->handle, &d->find_data)) {
      |                                  ^~~~~~~~~~~~~
      |                                  |
      |                                  WIN32_FIND_DATAW *
@illwieckz illwieckz changed the title nacl_host_dir: fix incompatible pointer type win/nacl_host_dir: fix incompatible pointer type Jun 26, 2026
@illwieckz illwieckz mentioned this pull request Jun 26, 2026
@illwieckz illwieckz changed the title win/nacl_host_dir: fix incompatible pointer type Fix incompatible pointer type in Windows code Jun 26, 2026
@illwieckz illwieckz force-pushed the illwieckz/incompatible-pointers branch from 28fc8b3 to 241d782 Compare June 26, 2026 10:07
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.

1 participant