9308 mdnsd: this statement may fall through

Review Request #971 — Created March 18, 2018 and submitted

tsoome
illumos-gate
9308
76ff4c0...
general
uDNS.c:2312:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
         if (!NATChanged) return;
            ^
uDNS.c:2315:5: note: here
     case regState_NoTarget:
     ^~~~

DNSCommon.c:1538:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
         len -= dlen;
         ~~~~^~~~~~~
DNSCommon.c:1542:5: note: here
     default:
     ^~~~~~~
DNSCommon.c: In function 'mDNS_vsnprintf':
DNSCommon.c:4187:29: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 F.precision = sizeof(void*) * 2;                // 8 characters on 32-bit; 16 characters on 64-bit
                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
DNSCommon.c:4188:13: note: here
             case 'X':  digits = "0123456789ABCDEF";
             ^~~~
DNSCommon.c:4280:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 i = mDNS_snprintf(mDNS_VACB, sizeof(mDNS_VACB), "<<UNKNOWN FORMAT CONVERSION CODE %%%c>>", c);
                 ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DNSCommon.c:4282:13: note: here
             case '%':  *sbuffer++ = (char)c;
             ^~~~

DNSDigest.c:612:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 0: l =((unsigned long)(*((c)++)));     \
                   ^
DNSDigest.c:670:22: note: in expansion of macro 'HOST_p_c2l'
             l=p[sw]; HOST_p_c2l(data,l,sc); p[sw++]=l;
                      ^~~~~~~~~~
DNSDigest.c:613:9: note: here
         case 1: l|=((unsigned long)(*((c)++)))<< 8; \
         ^
DNSDigest.c:670:22: note: in expansion of macro 'HOST_p_c2l'
             l=p[sw]; HOST_p_c2l(data,l,sc); p[sw++]=l;
                      ^~~~~~~~~~
DNSDigest.c:613:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 1: l|=((unsigned long)(*((c)++)))<< 8; \
                  ^
DNSDigest.c:670:22: note: in expansion of macro 'HOST_p_c2l'
             l=p[sw]; HOST_p_c2l(data,l,sc); p[sw++]=l;
                      ^~~~~~~~~~
DNSDigest.c:614:9: note: here
         case 2: l|=((unsigned long)(*((c)++)))<<16; \
         ^
DNSDigest.c:670:22: note: in expansion of macro 'HOST_p_c2l'
             l=p[sw]; HOST_p_c2l(data,l,sc); p[sw++]=l;
                      ^~~~~~~~~~
DNSDigest.c:614:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 2: l|=((unsigned long)(*((c)++)))<<16; \
                  ^
DNSDigest.c:670:22: note: in expansion of macro 'HOST_p_c2l'
             l=p[sw]; HOST_p_c2l(data,l,sc); p[sw++]=l;
                      ^~~~~~~~~~
DNSDigest.c:615:9: note: here
         case 3: l|=((unsigned long)(*((c)++)))<<24; \
         ^
DNSDigest.c:670:22: note: in expansion of macro 'HOST_p_c2l'
             l=p[sw]; HOST_p_c2l(data,l,sc); p[sw++]=l;
                      ^~~~~~~~~~
DNSDigest.c:620:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
             if (--len == 0) break;                                                 \
                ^
DNSDigest.c:685:26: note: in expansion of macro 'HOST_p_c2l_p'
                 l=p[sw]; HOST_p_c2l_p(data,l,sc,len); p[sw]=l;
                          ^~~~~~~~~~~~
DNSDigest.c:621:9: note: here
         case 1: l|=((unsigned long)(*((c)++)))<< 8; \
         ^
DNSDigest.c:685:26: note: in expansion of macro 'HOST_p_c2l_p'
                 l=p[sw]; HOST_p_c2l_p(data,l,sc,len); p[sw]=l;
                          ^~~~~~~~~~~~
DNSDigest.c:622:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
             if (--len == 0) break;                                                 \
                ^
DNSDigest.c:685:26: note: in expansion of macro 'HOST_p_c2l_p'
                 l=p[sw]; HOST_p_c2l_p(data,l,sc,len); p[sw]=l;
                          ^~~~~~~~~~~~
DNSDigest.c:623:9: note: here
         case 2: l|=((unsigned long)(*((c)++)))<<16; \
         ^
DNSDigest.c:685:26: note: in expansion of macro 'HOST_p_c2l_p'
                 l=p[sw]; HOST_p_c2l_p(data,l,sc,len); p[sw]=l;
                          ^~~~~~~~~~~~
DNSDigest.c:612:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 0: l =((unsigned long)(*((c)++)));     \
                   ^
DNSDigest.c:693:17: note: in expansion of macro 'HOST_p_c2l'
                 HOST_p_c2l(data,l,sc);
                 ^~~~~~~~~~
DNSDigest.c:613:9: note: here
         case 1: l|=((unsigned long)(*((c)++)))<< 8; \
         ^
DNSDigest.c:693:17: note: in expansion of macro 'HOST_p_c2l'
                 HOST_p_c2l(data,l,sc);
                 ^~~~~~~~~~
DNSDigest.c:613:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 1: l|=((unsigned long)(*((c)++)))<< 8; \
                  ^
DNSDigest.c:693:17: note: in expansion of macro 'HOST_p_c2l'
                 HOST_p_c2l(data,l,sc);
                 ^~~~~~~~~~
DNSDigest.c:614:9: note: here
         case 2: l|=((unsigned long)(*((c)++)))<<16; \
         ^
DNSDigest.c:693:17: note: in expansion of macro 'HOST_p_c2l'
                 HOST_p_c2l(data,l,sc);
                 ^~~~~~~~~~
DNSDigest.c:614:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 2: l|=((unsigned long)(*((c)++)))<<16; \
                  ^
DNSDigest.c:693:17: note: in expansion of macro 'HOST_p_c2l'
                 HOST_p_c2l(data,l,sc);
                 ^~~~~~~~~~
DNSDigest.c:615:9: note: here
         case 3: l|=((unsigned long)(*((c)++)))<<24; \
         ^
DNSDigest.c:693:17: note: in expansion of macro 'HOST_p_c2l'
                 HOST_p_c2l(data,l,sc);
                 ^~~~~~~~~~
DNSDigest.c:629:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 3: l =((unsigned long)(*(--(c))))<<16; \
                   ^
DNSDigest.c:701:21: note: in expansion of macro 'HOST_c2l_p'
                     HOST_c2l_p(data,l,ec); p[sw]=l;
                     ^~~~~~~~~~
DNSDigest.c:630:9: note: here
         case 2: l|=((unsigned long)(*(--(c))))<< 8; \
         ^
DNSDigest.c:701:21: note: in expansion of macro 'HOST_c2l_p'
                     HOST_c2l_p(data,l,ec); p[sw]=l;
                     ^~~~~~~~~~
DNSDigest.c:630:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 2: l|=((unsigned long)(*(--(c))))<< 8; \
                  ^
DNSDigest.c:701:21: note: in expansion of macro 'HOST_c2l_p'
                     HOST_c2l_p(data,l,ec); p[sw]=l;
                     ^~~~~~~~~~
DNSDigest.c:631:9: note: here
         case 1: l|=((unsigned long)(*(--(c))));     \
         ^
DNSDigest.c:701:21: note: in expansion of macro 'HOST_c2l_p'
                     HOST_c2l_p(data,l,ec); p[sw]=l;
                     ^~~~~~~~~~
DNSDigest.c:629:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 3: l =((unsigned long)(*(--(c))))<<16; \
                   ^
DNSDigest.c:755:9: note: in expansion of macro 'HOST_c2l_p'
         HOST_c2l_p(data,l,ec);
         ^~~~~~~~~~
DNSDigest.c:630:9: note: here
         case 2: l|=((unsigned long)(*(--(c))))<< 8; \
         ^
DNSDigest.c:755:9: note: in expansion of macro 'HOST_c2l_p'
         HOST_c2l_p(data,l,ec);
         ^~~~~~~~~~
DNSDigest.c:630:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 2: l|=((unsigned long)(*(--(c))))<< 8; \
                  ^
DNSDigest.c:755:9: note: in expansion of macro 'HOST_c2l_p'
         HOST_c2l_p(data,l,ec);
         ^~~~~~~~~~
DNSDigest.c:631:9: note: here
         case 1: l|=((unsigned long)(*(--(c))));     \
         ^
DNSDigest.c:755:9: note: in expansion of macro 'HOST_c2l_p'
         HOST_c2l_p(data,l,ec);
         ^~~~~~~~~~
DNSDigest.c: In function 'MD5_Final':
DNSDigest.c:612:19: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 0: l =((unsigned long)(*((c)++)));     \
                   ^
DNSDigest.c:812:5: note: in expansion of macro 'HOST_p_c2l'
     HOST_p_c2l(cp,l,j); p[i++]=l; /* i is the next 'undefined word' */
     ^~~~~~~~~~
DNSDigest.c:613:9: note: here
         case 1: l|=((unsigned long)(*((c)++)))<< 8; \
         ^
DNSDigest.c:812:5: note: in expansion of macro 'HOST_p_c2l'
     HOST_p_c2l(cp,l,j); p[i++]=l; /* i is the next 'undefined word' */
     ^~~~~~~~~~
DNSDigest.c:613:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 1: l|=((unsigned long)(*((c)++)))<< 8; \
                  ^
DNSDigest.c:812:5: note: in expansion of macro 'HOST_p_c2l'
     HOST_p_c2l(cp,l,j); p[i++]=l; /* i is the next 'undefined word' */
     ^~~~~~~~~~
DNSDigest.c:614:9: note: here
         case 2: l|=((unsigned long)(*((c)++)))<<16; \
         ^
DNSDigest.c:812:5: note: in expansion of macro 'HOST_p_c2l'
     HOST_p_c2l(cp,l,j); p[i++]=l; /* i is the next 'undefined word' */
     ^~~~~~~~~~
DNSDigest.c:614:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 2: l|=((unsigned long)(*((c)++)))<<16; \
                  ^
DNSDigest.c:812:5: note: in expansion of macro 'HOST_p_c2l'
     HOST_p_c2l(cp,l,j); p[i++]=l; /* i is the next 'undefined word' */
     ^~~~~~~~~~
DNSDigest.c:615:9: note: here
         case 3: l|=((unsigned long)(*((c)++)))<<24; \
         ^
DNSDigest.c:812:5: note: in expansion of macro 'HOST_p_c2l'
     HOST_p_c2l(cp,l,j); p[i++]=l; /* i is the next 'undefined word' */
     ^~~~~~~~~~
cc1: all warnings being treated as errors


andy_js
  1. I would be inclined to just turn the warnings off for mdnsd.

  2. 
      
seeemef@mac.com
  1. This seems a nominal revision, so contrary to astormont, I vote "Ship It".

  2. 
      
citrus
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...