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

warning: invalid conversion from 'void*' to 'udc_data* #833

Closed
mondalaci opened this issue Feb 26, 2024 · 2 comments
Closed

warning: invalid conversion from 'void*' to 'udc_data* #833

mondalaci opened this issue Feb 26, 2024 · 2 comments

Comments

@mondalaci
Copy link
Member

I get a bunch of warnings like this during the build:

/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h:302:38: warning: invalid conversion from 'void*' to 'udc_data*' [-fpermissive]
  302 |         struct udc_data *data = dev->data;
      |                                 ~~~~~^~~~
      |                                      |
      |                                      void*

@benedekkupper I want to clean up the build output. How can we resolve these warnings, preferably without globally disabling warnings that can be useful?

@mondalaci
Copy link
Member Author

This should be the full list:

/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h: In function 'bool udc_is_initialized(const device*)':
/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h:302:38: warning: invalid conversion from 'void*' to 'udc_data*' [-fpermissive]
  302 |         struct udc_data *data = dev->data;
      |                                 ~~~~~^~~~
      |                                      |
      |                                      void*
/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h: In function 'bool udc_is_enabled(const device*)':
/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h:316:38: warning: invalid conversion from 'void*' to 'udc_data*' [-fpermissive]
  316 |         struct udc_data *data = dev->data;
      |                                 ~~~~~^~~~
      |                                      |
      |                                      void*
/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h: In function 'bool udc_is_suspended(const device*)':
/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h:330:38: warning: invalid conversion from 'void*' to 'udc_data*' [-fpermissive]
  330 |         struct udc_data *data = dev->data;
      |                                 ~~~~~^~~~
      |                                      |
      |                                      void*
/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h: In function 'udc_device_caps udc_caps(const device*)':
/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h:403:38: warning: invalid conversion from 'void*' to 'udc_data*' [-fpermissive]
  403 |         struct udc_data *data = dev->data;
      |                                 ~~~~~^~~~
      |                                      |
      |                                      void*
/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h: In function 'int udc_set_address(const device*, uint8_t)':
/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h:433:42: warning: invalid conversion from 'const void*' to 'const udc_api*' [-fpermissive]
  433 |         const struct udc_api *api = dev->api;
      |                                     ~~~~~^~~
      |                                          |
      |                                          const void*
/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h: In function 'int udc_host_wakeup(const device*)':
/home/laci/projects/firmware-uhk80/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h:459:42: warning: invalid conversion from 'const void*' to 'const udc_api*' [-fpermissive]
  459 |         const struct udc_api *api = dev->api;
      |                                     ~~~~~^~~
      |                                          |
      |                                          const void*

@benedekkupper
Copy link
Contributor

benedekkupper commented Feb 26, 2024

This is not fixable on our side: https://stackoverflow.com/questions/19214645/how-to-suppress-warnings-for-void-to-foo-conversions-reduced-from-errors

I have sent a PR to zephyr: zephyrproject-rtos/zephyr#69490

@benedekkupper benedekkupper closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
@mondalaci mondalaci transferred this issue from UltimateHackingKeyboard/firmware80 Dec 12, 2024
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

No branches or pull requests

2 participants