Skip to content

Fix warnings #31

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fix warnings #31

wants to merge 3 commits into from

Conversation

bearmini
Copy link

Hi,

Thank you for providing this wonderful library!

I received some warning messages when I built my code with this library, but it looked like it could be easily fixed so I fixed it on my end.

Please take a look, thank you in advance!

this commit fixes the warning below:

```
In file included from .pio/libdeps/m5stack-fire/WireGuard-ESP32/src/wireguardif.c:51:
.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/tcpip_adapter/include/tcpip_adapter.h:15:2: warning: #warning "This header is deprecated, please use new network related API in esp_netif.h" [-Wcpp]
 #warning "This header is deprecated, please use new network related API in esp_netif.h"
  ^~~~~~~
This commit fixes the following warning:

.pio/libdeps/m5stack-fire/WireGuard-ESP32/src/wireguardif.c: In function 'wireguardif_init':
.pio/libdeps/m5stack-fire/WireGuard-ESP32/src/wireguardif.c:1103:48: warning: passing argument 2 of 'tcpip_adapter_get_netif' from incompatible pointer type [-Wincompatible-pointer-types]
  tcpip_adapter_get_netif(TCPIP_ADAPTER_IF_STA, &underlying_netif);
                                                ^~~~~~~~~~~~~~~~~
In file included from .platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_netif/include/esp_netif.h:35,
                 from .platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/tcpip_adapter/include/tcpip_adapter.h:16,
                 from .pio/libdeps/m5stack-fire/WireGuard-ESP32/src/wireguardif.c:51:
.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/tcpip_adapter/include/tcpip_adapter.h:95:72: note: expected 'void **' but argument is of type 'struct netif **'
 esp_err_t tcpip_adapter_get_netif(tcpip_adapter_if_t tcpip_if, void ** netif);
                                                                ~~~~~~~~^~~~~
This commit fixes the following warning:

.pio/libdeps/m5stack-fire/WireGuard-ESP32/src/wireguardif.c: In function 'wireguardif_tmr':
.pio/libdeps/m5stack-fire/WireGuard-ESP32/src/wireguardif.c:1039:5: warning: implicit declaration of function 'handshake_destroy'; did you mean 'keypair_destroy'? [-Wimplicit-function-declaration]
     handshake_destroy(&peer->handshake);
     ^~~~~~~~~~~~~~~~~
     keypair_destroy
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