diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-07 08:42:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-07 08:42:19 -0400 |
commit | fd0961ce6be4fef6201e3e239c9e633e0c8061da (patch) | |
tree | b896dd3ef1d993ead3ae8b50203b10b00c6bfbcb | |
parent | 56e81bdded495c34804555c6e0adeb799ac769b9 (diff) | |
parent | a08e6e711fbcd6a12818f1fe14739fc0e870434d (diff) | |
download | tor-fd0961ce6be4fef6201e3e239c9e633e0c8061da.tar.gz tor-fd0961ce6be4fef6201e3e239c9e633e0c8061da.zip |
Merge branch 'maint-0.3.2' into release-0.3.2
-rw-r--r-- | changes/bug27465 | 5 | ||||
-rw-r--r-- | src/common/address.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/changes/bug27465 b/changes/bug27465 new file mode 100644 index 0000000000..743b35130f --- /dev/null +++ b/changes/bug27465 @@ -0,0 +1,5 @@ + o Minor bugfixes (compilation): + - Silence a spurious compiler warning on the GetAdaptersAddresses + function pointer cast. This issue is already fixed by 26481 in + 0.3.5 and later, by removing the lookup and cast. + Fixes bug 27465; bugfix on 0.2.3.11-alpha. diff --git a/src/common/address.c b/src/common/address.c index c7aa97bfd1..ef3117aefd 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -1496,7 +1496,10 @@ get_interface_addresses_win32(int severity, sa_family_t family) goto done; } - if (!(fn = (GetAdaptersAddresses_fn_t) + /* Cast through a void function pointer, to silence a spurious compiler + * warning on 64-bit Windows. This cast is safe, because we are casting to + * the correct type for GetAdaptersAddresses(). */ + if (!(fn = (GetAdaptersAddresses_fn_t)(void(*)(void)) GetProcAddress(lib, "GetAdaptersAddresses"))) { log_fn(severity, LD_NET, "Unable to obtain pointer to " "GetAdaptersAddresses"); |