Hi,

Please apply the following or a variation, thanks.

diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c
index 046fde685..6f4feff84 100644
--- a/sys/arch/amd64/amd64/identcpu.c
+++ b/sys/arch/amd64/amd64/identcpu.c
@@ -804,7 +804,7 @@ cpu_topology(struct cpu_info *ci)
                core_mask ^= smt_mask;
                /* Pkg */
                pkg_bits = core_bits + smt_bits;
-               pkg_mask = -1 << core_bits;
+               pkg_mask = ~0U << core_bits;
 
                ci->ci_smt_id = apicid & smt_mask;
                ci->ci_core_id = (apicid & core_mask) >> smt_bits;
diff --git a/sys/arch/hppa/hppa/db_disasm.c b/sys/arch/hppa/hppa/db_disasm.c
index 071f91235..51c4d641d 100644
--- a/sys/arch/hppa/hppa/db_disasm.c
+++ b/sys/arch/hppa/hppa/db_disasm.c
@@ -867,11 +867,11 @@ struct majoropcode {
 #define        Im11(i)         (Im11S(i) ?   Im11M(i) | (-1<<10) : Im11M(i))
 
 #define        Bdisp(i)        ((OffS(i) ? (Off5(i)<<11 | 
Off11L(i)<<10|Off11H(i)) \
-/* branch displacement (bytes) */      | (-1 << 16)                    \
+/* branch displacement (bytes) */      | (~0U << 16)                   \
                                  : (Off5(i)<<11|Off11L(i)<<10|Off11H(i))) << 2)
 
 #define        Cbdisp(i)       ((OffS(i) ?   (Off11L(i) << 10 | Off11H(i)) \
- /* compare/branch disp (bytes) */ | (-1 << 11)                        \
+ /* compare/branch disp (bytes) */ | (~0U << 11)                       \
                                  :    Off11L(i) << 10 | Off11H(i)) << 2)
 
 #define        Sr(i)           (SrH(i)<<2 | SrL(i))
diff --git a/sys/net/pf_table.c b/sys/net/pf_table.c
index bc93e8709..440759ee9 100644
--- a/sys/net/pf_table.c
+++ b/sys/net/pf_table.c
@@ -1028,7 +1028,7 @@ pfr_prepare_network(union sockaddr_union *sa, int af, int 
net)
        case AF_INET:
                sa->sin.sin_len = sizeof(sa->sin);
                sa->sin.sin_family = AF_INET;
-               sa->sin.sin_addr.s_addr = net ? htonl(-1 << (32-net)) : 0;
+               sa->sin.sin_addr.s_addr = net ? htonl(~0U << (32-net)) : 0;
                break;
 #ifdef INET6
        case AF_INET6:
@@ -1037,7 +1037,7 @@ pfr_prepare_network(union sockaddr_union *sa, int af, int 
net)
                for (i = 0; i < 4; i++) {
                        if (net <= 32) {
                                sa->sin6.sin6_addr.s6_addr32[i] =
-                                   net ? htonl(-1 << (32-net)) : 0;
+                                   net ? htonl(~0U << (32-net)) : 0;
                                break;
                        }
                        sa->sin6.sin6_addr.s6_addr32[i] = 0xFFFFFFFF;

Reply via email to