Building for mingw, I got this warning:
libvirt.c:242: warning: control reaches end of non-void function
Here's the fix:
fix mingw compilation warning
* src/libvirt.c (winsock_init) [HAVE_WINSOCK2_H]: Always return a value.
diff --git a/src/libvirt.c b/src/libvirt.c
index ca2675a..05a92d3 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -237,8 +237,7 @@ winsock_init (void)
/*
http://msdn2.microsoft.com/en-us/library/ms742213.aspx */
winsock_version = MAKEWORD (2, 2);
err = WSAStartup (winsock_version, &winsock_data);
- if (err != 0)
- return -1;
+ return err == 0 ? 0 : -1;
}
#endif
--
1.6.0.2.588.g3102