Browse Source

Enable -Wformat under clang-cl
commit_hash:b2cf3b80a36e4867b03a79f3e2c552f19920016f

thegeorg 3 months ago
parent
commit
6c9370843e
2 changed files with 3 additions and 4 deletions
  1. 2 3
      build/ymake_conf.py
  2. 1 1
      library/cpp/netliba/v6/udp_address.cpp

+ 2 - 3
build/ymake_conf.py

@@ -2082,11 +2082,10 @@ class MSVCCompiler(MSVC, Compiler):
             elif target.is_x86_64:
                 flags.append('-m64')
 
-            c_warnings.extend((
-                '-Wno-format',
+            c_warnings += [
                 '-Wno-parentheses',
                 '-Wno-unknown-warning-option',
-            ))
+            ]
 
             cxx_warnings += [
                 '-Wimport-preprocessor-directive-pedantic',

+ 1 - 1
library/cpp/netliba/v6/udp_address.cpp

@@ -196,7 +196,7 @@ namespace NNetliba {
                 continue;
             }
             if (ptr->Mtu < 1280) {
-                fprintf(stderr, "WARNING: MTU %d is less then ipv6 minimum", ptr->Mtu);
+                fprintf(stderr, "WARNING: MTU %lu is less then ipv6 minimum", ptr->Mtu);
             }
             for (IP_ADAPTER_UNICAST_ADDRESS* addr = ptr->FirstUnicastAddress; addr; addr = addr->Next) {
                 sockaddr* x = (sockaddr*)addr->Address.lpSockaddr;