mjansson / mdns

Public domain mDNS/DNS-SD library in C
The Unlicense
459 stars 120 forks source link

compile with MSVC without warnings. #22

Closed rgetz closed 4 years ago

rgetz commented 4 years ago

We compile our MSVC projects with the following flags: /W4 /wd4200 /wd4127 /wd4100 /WX

to get things to compile - we needed to do:

Free free to use or ignore. Thanks

--- ../mdns/mdns.h      2020-05-22 10:59:35.848102185 -0400
+++ ./mdns.h    2020-05-22 11:00:41.592646263 -0400
@@ -470,7 +471,9 @@
        size_t cur = *offset;
        size_t end = MDNS_INVALID_POS;
        mdns_string_pair_t substr;
-       mdns_string_t result = {str, 0};
+      mdns_string_t result;
+      result.str = str;
+      result.length = 0;
        char* dst = str;
        size_t remain = capacity;
        do {
mjansson commented 4 years ago

Hopefully all the warnings should be ironed out now

rgetz commented 4 years ago

thanks