Skip to content
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

-Wpragma-pack MSYS2 clang32/clang64 compiler warning with Windows #1395

Open
mcuee opened this issue Dec 21, 2023 · 1 comment
Open

-Wpragma-pack MSYS2 clang32/clang64 compiler warning with Windows #1395

mcuee opened this issue Dec 21, 2023 · 1 comment
Labels

Comments

@mcuee
Copy link
Member

mcuee commented Dec 21, 2023

Reference: github action clang build log
https://github.com/libusb/libusb/actions/runs/7255523523/job/19766296521

make  all-recursive
make[1]: Entering directory '/d/a/libusb/libusb/build-msys2-clang64'
Making all in libusb
make[2]: Entering directory '/d/a/libusb/libusb/build-msys2-clang64/libusb'
  CC       core.lo
  CC       descriptor.lo
  CC       hotplug.lo
  CC       io.lo
../../libusb/core.c:2490:10: warning: 4 enumeration values not explicitly handled in switch: 'LIBUSB_OPTION_LOG_LEVEL', 'LIBUSB_OPTION_USE_USBDK', 'LIBUSB_OPTION_NO_DEVICE_DISCOVERY'... [-Wswitch-enum]
 2490 |                 switch(options[i].option) {
      |                        ^~~~~~~~~~~~~~~~~
1 warning generated.
  CC       strerror.lo
  CC       sync.lo
  RC       libusb-1.0.lo
  CC       os/events_windows.lo
  CC       os/threads_windows.lo
In file included from ../../libusb/os/events_windows.c:24:
../../libusb/os/windows_common.h:[163](https://github.com/libusb/libusb/actions/runs/7255523523/job/19766296521#step:4:164):10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  163 | #include <pshpack1.h>
      |          ^
D:/a/_temp/msys64/clang64/include/pshpack1.h:7:9: note: previous '#pragma pack' directive that modifies alignment is here
    7 | #pragma pack(push,1)
      |         ^
In file included from ../../libusb/os/events_windows.c:24:
../../libusb/os/windows_common.h:[193](https://github.com/libusb/libusb/actions/runs/7255523523/job/19766296521#step:4:194):10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  193 | #include <poppack.h>
      |          ^
note: previous '#pragma pack' directive that modifies alignment is here
2 warnings generated.
  CC       os/windows_common.lo
  CC       os/windows_usbdk.lo
  CC       os/windows_winusb.lo
In file included from ../../libusb/os/windows_common.c:30:
../../libusb/os/windows_common.h:163:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  163 | #include <pshpack1.h>
      |          ^
D:/a/_temp/msys64/clang64/include/pshpack1.h:7:9: note: previous '#pragma pack' directive that modifies alignment is here
    7 | #pragma pack(push,1)
      |         ^
In file included from ../../libusb/os/windows_common.c:30:
../../libusb/os/windows_common.h:193:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  193 | #include <poppack.h>
      |          ^
note: previous '#pragma pack' directive that modifies alignment is here
2 warnings generated.
In file included from ../../libusb/os/windows_usbdk.c:30:
In file included from ../../libusb/os/windows_usbdk.h:27:
../../libusb/os/windows_common.h:163:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  163 | #include <pshpack1.h>
      |          ^
D:/a/_temp/msys64/clang64/include/pshpack1.h:7:9: note: previous '#pragma pack' directive that modifies alignment is here
    7 | #pragma pack(push,1)
      |         ^
In file included from ../../libusb/os/windows_usbdk.c:30:
In file included from ../../libusb/os/windows_usbdk.h:27:
../../libusb/os/windows_common.h:193:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  193 | #include <poppack.h>
      |          ^
note: previous '#pragma pack' directive that modifies alignment is here
2 warnings generated.
In file included from ../../libusb/os/windows_winusb.c:34:
In file included from ../../libusb/os/windows_winusb.h:30:
../../libusb/os/windows_common.h:163:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  163 | #include <pshpack1.h>
      |          ^
D:/a/_temp/msys64/clang64/include/pshpack1.h:7:9: note: previous '#pragma pack' directive that modifies alignment is here
    7 | #pragma pack(push,1)
      |         ^
In file included from ../../libusb/os/windows_winusb.c:34:
In file included from ../../libusb/os/windows_winusb.h:30:
../../libusb/os/windows_common.h:193:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  193 | #include <poppack.h>
      |          ^
note: previous '#pragma pack' directive that modifies alignment is here
In file included from ../../libusb/os/windows_winusb.c:34:
../../libusb/os/windows_winusb.h:310:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  310 | #include <pshpack1.h>
      |          ^
D:/a/_temp/msys64/clang64/include/pshpack1.h:7:9: note: previous '#pragma pack' directive that modifies alignment is here
    7 | #pragma pack(push,1)
      |         ^
In file included from ../../libusb/os/windows_winusb.c:34:
../../libusb/os/windows_winusb.h:404:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  404 | #include <poppack.h>
      |          ^
note: previous '#pragma pack' directive that modifies alignment is here
../../libusb/os/windows_winusb.h:446:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  446 | #include <pshpack1.h>
      |          ^
D:/a/_temp/msys64/clang64/include/pshpack1.h:7:9: note: previous '#pragma pack' directive that modifies alignment is here
    7 | #pragma pack(push,1)
      |         ^
In file included from ../../libusb/os/windows_winusb.c:34:
../../libusb/os/windows_winusb.h:456:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  456 | #include <poppack.h>
      |          ^
note: previous '#pragma pack' directive that modifies alignment is here
../../libusb/os/windows_winusb.h:698:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  698 | #include <pshpack1.h>
      |          ^
D:/a/_temp/msys64/clang64/include/pshpack1.h:7:9: note: previous '#pragma pack' directive that modifies alignment is here
    7 | #pragma pack(push,1)
      |         ^
In file included from ../../libusb/os/windows_winusb.c:34:
../../libusb/os/windows_winusb.h:707:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
  707 | #include <poppack.h>
      |          ^
note: previous '#pragma pack' directive that modifies alignment is here
8 warnings generated.
  CCLD     libusb-1.0.la
  DLLTOOL  .libs/libusb-1.0.dll.a
make[2]: Leaving directory '/d/a/libusb/libusb/build-msys2-clang64/libusb'
@mcuee mcuee added the windows label Dec 21, 2023
@mcuee
Copy link
Member Author

mcuee commented Dec 26, 2023

This issue is not a blocker for libusb-1.0.27 as it is also there in libusb-1.0.26 (not a regression).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant