Skip to content

Commit 9358be3

Browse files
committed
Remove unnecessary parenthesis
This triggers a warning on a recent nightly, which in turn breaks CI due to `#![deny(warnings)]` in libc-test/build.rs
1 parent 1c5dab1 commit 9358be3

File tree

15 files changed

+158
-158
lines changed

15 files changed

+158
-158
lines changed

libc-test/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ fn test_openbsd(target: &str) {
389389

390390
cfg.skip_field_type(move |struct_, field| {
391391
// type siginfo_t.si_addr changed from OpenBSD 6.0 to 6.1
392-
(struct_ == "siginfo_t" && field == "si_addr")
392+
struct_ == "siginfo_t" && field == "si_addr"
393393
});
394394

395395
cfg.generate("../src/lib.rs", "main.rs");

src/fuchsia/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,12 +1509,12 @@ pub const LC_COLLATE: ::c_int = 3;
15091509
pub const LC_MONETARY: ::c_int = 4;
15101510
pub const LC_MESSAGES: ::c_int = 5;
15111511
pub const LC_ALL: ::c_int = 6;
1512-
pub const LC_CTYPE_MASK: ::c_int = (1 << LC_CTYPE);
1513-
pub const LC_NUMERIC_MASK: ::c_int = (1 << LC_NUMERIC);
1514-
pub const LC_TIME_MASK: ::c_int = (1 << LC_TIME);
1515-
pub const LC_COLLATE_MASK: ::c_int = (1 << LC_COLLATE);
1516-
pub const LC_MONETARY_MASK: ::c_int = (1 << LC_MONETARY);
1517-
pub const LC_MESSAGES_MASK: ::c_int = (1 << LC_MESSAGES);
1512+
pub const LC_CTYPE_MASK: ::c_int = 1 << LC_CTYPE;
1513+
pub const LC_NUMERIC_MASK: ::c_int = 1 << LC_NUMERIC;
1514+
pub const LC_TIME_MASK: ::c_int = 1 << LC_TIME;
1515+
pub const LC_COLLATE_MASK: ::c_int = 1 << LC_COLLATE;
1516+
pub const LC_MONETARY_MASK: ::c_int = 1 << LC_MONETARY;
1517+
pub const LC_MESSAGES_MASK: ::c_int = 1 << LC_MESSAGES;
15181518
// LC_ALL_MASK defined per platform
15191519

15201520
pub const MAP_FILE: ::c_int = 0x0000;
@@ -2691,7 +2691,7 @@ pub const FOPEN_MAX: ::c_uint = 1000;
26912691
pub const O_PATH: ::c_int = 0x00400000;
26922692
pub const O_EXEC: ::c_int = O_PATH;
26932693
pub const O_SEARCH: ::c_int = O_PATH;
2694-
pub const O_ACCMODE: ::c_int = (03 | O_SEARCH);
2694+
pub const O_ACCMODE: ::c_int = 03 | O_SEARCH;
26952695
pub const O_NDELAY: ::c_int = O_NONBLOCK;
26962696
pub const NI_MAXHOST: ::socklen_t = 255;
26972697
pub const PTHREAD_STACK_MIN: ::size_t = 2048;
@@ -2893,7 +2893,7 @@ pub const O_CREAT: ::c_int = 0x00010000;
28932893
pub const O_EXCL: ::c_int = 0x00020000;
28942894
pub const O_NOCTTY: ::c_int = 0x00000200;
28952895
pub const O_NONBLOCK: ::c_int = 0x00000010;
2896-
pub const O_SYNC: ::c_int = (0x00000040 | O_DSYNC);
2896+
pub const O_SYNC: ::c_int = 0x00000040 | O_DSYNC;
28972897
pub const O_RSYNC: ::c_int = O_SYNC;
28982898
pub const O_DSYNC: ::c_int = 0x00000020;
28992899

src/unix/bsd/apple/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,12 +1239,12 @@ pub const ACCOUNTING: ::c_short = 9;
12391239
pub const SIGNATURE: ::c_short = 10;
12401240
pub const SHUTDOWN_TIME: ::c_short = 11;
12411241

1242-
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
1243-
pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
1244-
pub const LC_MESSAGES_MASK: ::c_int = (1 << 2);
1245-
pub const LC_MONETARY_MASK: ::c_int = (1 << 3);
1246-
pub const LC_NUMERIC_MASK: ::c_int = (1 << 4);
1247-
pub const LC_TIME_MASK: ::c_int = (1 << 5);
1242+
pub const LC_COLLATE_MASK: ::c_int = 1 << 0;
1243+
pub const LC_CTYPE_MASK: ::c_int = 1 << 1;
1244+
pub const LC_MESSAGES_MASK: ::c_int = 1 << 2;
1245+
pub const LC_MONETARY_MASK: ::c_int = 1 << 3;
1246+
pub const LC_NUMERIC_MASK: ::c_int = 1 << 4;
1247+
pub const LC_TIME_MASK: ::c_int = 1 << 5;
12481248
pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
12491249
| LC_CTYPE_MASK
12501250
| LC_MESSAGES_MASK

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -956,12 +956,12 @@ pub const UTX_DB_UTMPX: ::c_uint = 0;
956956
pub const UTX_DB_WTMPX: ::c_uint = 1;
957957
pub const UTX_DB_LASTLOG: ::c_uint = 2;
958958

959-
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
960-
pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
961-
pub const LC_MONETARY_MASK: ::c_int = (1 << 2);
962-
pub const LC_NUMERIC_MASK: ::c_int = (1 << 3);
963-
pub const LC_TIME_MASK: ::c_int = (1 << 4);
964-
pub const LC_MESSAGES_MASK: ::c_int = (1 << 5);
959+
pub const LC_COLLATE_MASK: ::c_int = 1 << 0;
960+
pub const LC_CTYPE_MASK: ::c_int = 1 << 1;
961+
pub const LC_MONETARY_MASK: ::c_int = 1 << 2;
962+
pub const LC_NUMERIC_MASK: ::c_int = 1 << 3;
963+
pub const LC_TIME_MASK: ::c_int = 1 << 4;
964+
pub const LC_MESSAGES_MASK: ::c_int = 1 << 5;
965965
pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
966966
| LC_CTYPE_MASK
967967
| LC_MESSAGES_MASK

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,12 +1024,12 @@ pub const UTXDB_ACTIVE: ::c_int = 0;
10241024
pub const UTXDB_LASTLOGIN: ::c_int = 1;
10251025
pub const UTXDB_LOG: ::c_int = 2;
10261026

1027-
pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
1028-
pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
1029-
pub const LC_MONETARY_MASK: ::c_int = (1 << 2);
1030-
pub const LC_NUMERIC_MASK: ::c_int = (1 << 3);
1031-
pub const LC_TIME_MASK: ::c_int = (1 << 4);
1032-
pub const LC_MESSAGES_MASK: ::c_int = (1 << 5);
1027+
pub const LC_COLLATE_MASK: ::c_int = 1 << 0;
1028+
pub const LC_CTYPE_MASK: ::c_int = 1 << 1;
1029+
pub const LC_MONETARY_MASK: ::c_int = 1 << 2;
1030+
pub const LC_NUMERIC_MASK: ::c_int = 1 << 3;
1031+
pub const LC_TIME_MASK: ::c_int = 1 << 4;
1032+
pub const LC_MESSAGES_MASK: ::c_int = 1 << 5;
10331033
pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
10341034
| LC_CTYPE_MASK
10351035
| LC_MESSAGES_MASK

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -865,12 +865,12 @@ pub const AT_REMOVEDIR: ::c_int = 0x800;
865865
pub const EXTATTR_NAMESPACE_USER: ::c_int = 1;
866866
pub const EXTATTR_NAMESPACE_SYSTEM: ::c_int = 2;
867867

868-
pub const LC_COLLATE_MASK: ::c_int = (1 << ::LC_COLLATE);
869-
pub const LC_CTYPE_MASK: ::c_int = (1 << ::LC_CTYPE);
870-
pub const LC_MONETARY_MASK: ::c_int = (1 << ::LC_MONETARY);
871-
pub const LC_NUMERIC_MASK: ::c_int = (1 << ::LC_NUMERIC);
872-
pub const LC_TIME_MASK: ::c_int = (1 << ::LC_TIME);
873-
pub const LC_MESSAGES_MASK: ::c_int = (1 << ::LC_MESSAGES);
868+
pub const LC_COLLATE_MASK: ::c_int = 1 << ::LC_COLLATE;
869+
pub const LC_CTYPE_MASK: ::c_int = 1 << ::LC_CTYPE;
870+
pub const LC_MONETARY_MASK: ::c_int = 1 << ::LC_MONETARY;
871+
pub const LC_NUMERIC_MASK: ::c_int = 1 << ::LC_NUMERIC;
872+
pub const LC_TIME_MASK: ::c_int = 1 << ::LC_TIME;
873+
pub const LC_MESSAGES_MASK: ::c_int = 1 << ::LC_MESSAGES;
874874
pub const LC_ALL_MASK: ::c_int = !0;
875875

876876
pub const ERA: ::nl_item = 52;

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,8 +1315,8 @@ pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit
13151315
pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit
13161316
pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast
13171317

1318-
pub const PTHREAD_STACK_MIN: ::size_t = (1_usize << _MAX_PAGE_SHIFT);
1319-
pub const MINSIGSTKSZ: ::size_t = (3_usize << _MAX_PAGE_SHIFT);
1318+
pub const PTHREAD_STACK_MIN: ::size_t = 1_usize << _MAX_PAGE_SHIFT;
1319+
pub const MINSIGSTKSZ: ::size_t = 3_usize << _MAX_PAGE_SHIFT;
13201320
pub const SIGSTKSZ: ::size_t = MINSIGSTKSZ + (1_usize << _MAX_PAGE_SHIFT) * 4;
13211321

13221322
pub const PT_FIRSTMACH: ::c_int = 32;

src/unix/haiku/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ f! {
12381238
}
12391239

12401240
pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
1241-
(status & 0xff)
1241+
status & 0xff
12421242
}
12431243

12441244
pub fn WIFSIGNALED(status: ::c_int) -> bool {

src/unix/linux_like/android/mod.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -831,12 +831,12 @@ pub const LC_ADDRESS: ::c_int = 9;
831831
pub const LC_TELEPHONE: ::c_int = 10;
832832
pub const LC_MEASUREMENT: ::c_int = 11;
833833
pub const LC_IDENTIFICATION: ::c_int = 12;
834-
pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
835-
pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
836-
pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
837-
pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
838-
pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
839-
pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
834+
pub const LC_PAPER_MASK: ::c_int = 1 << LC_PAPER;
835+
pub const LC_NAME_MASK: ::c_int = 1 << LC_NAME;
836+
pub const LC_ADDRESS_MASK: ::c_int = 1 << LC_ADDRESS;
837+
pub const LC_TELEPHONE_MASK: ::c_int = 1 << LC_TELEPHONE;
838+
pub const LC_MEASUREMENT_MASK: ::c_int = 1 << LC_MEASUREMENT;
839+
pub const LC_IDENTIFICATION_MASK: ::c_int = 1 << LC_IDENTIFICATION;
840840
pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
841841
| ::LC_NUMERIC_MASK
842842
| ::LC_TIME_MASK
@@ -1695,12 +1695,12 @@ pub const NFT_CMP_GTE: ::c_int = 5;
16951695
pub const NFT_RANGE_EQ: ::c_int = 0;
16961696
pub const NFT_RANGE_NEQ: ::c_int = 1;
16971697

1698-
pub const NFT_LOOKUP_F_INV: ::c_int = (1 << 0);
1698+
pub const NFT_LOOKUP_F_INV: ::c_int = 1 << 0;
16991699

17001700
pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
17011701
pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
17021702

1703-
pub const NFT_DYNSET_F_INV: ::c_int = (1 << 0);
1703+
pub const NFT_DYNSET_F_INV: ::c_int = 1 << 0;
17041704

17051705
pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
17061706
pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
@@ -1755,13 +1755,13 @@ pub const NFT_CT_BYTES: ::c_int = 15;
17551755
pub const NFT_LIMIT_PKTS: ::c_int = 0;
17561756
pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
17571757

1758-
pub const NFT_LIMIT_F_INV: ::c_int = (1 << 0);
1758+
pub const NFT_LIMIT_F_INV: ::c_int = 1 << 0;
17591759

17601760
pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
17611761
pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
17621762
pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
17631763

1764-
pub const NFT_QUOTA_F_INV: ::c_int = (1 << 0);
1764+
pub const NFT_QUOTA_F_INV: ::c_int = 1 << 0;
17651765

17661766
pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
17671767
pub const NFT_REJECT_TCP_RST: ::c_int = 1;
@@ -1953,11 +1953,11 @@ pub const IN_MODIFY: u32 = 0x0000_0002;
19531953
pub const IN_ATTRIB: u32 = 0x0000_0004;
19541954
pub const IN_CLOSE_WRITE: u32 = 0x0000_0008;
19551955
pub const IN_CLOSE_NOWRITE: u32 = 0x0000_0010;
1956-
pub const IN_CLOSE: u32 = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE);
1956+
pub const IN_CLOSE: u32 = IN_CLOSE_WRITE | IN_CLOSE_NOWRITE;
19571957
pub const IN_OPEN: u32 = 0x0000_0020;
19581958
pub const IN_MOVED_FROM: u32 = 0x0000_0040;
19591959
pub const IN_MOVED_TO: u32 = 0x0000_0080;
1960-
pub const IN_MOVE: u32 = (IN_MOVED_FROM | IN_MOVED_TO);
1960+
pub const IN_MOVE: u32 = IN_MOVED_FROM | IN_MOVED_TO;
19611961
pub const IN_CREATE: u32 = 0x0000_0100;
19621962
pub const IN_DELETE: u32 = 0x0000_0200;
19631963
pub const IN_DELETE_SELF: u32 = 0x0000_0400;
@@ -1974,7 +1974,7 @@ pub const IN_DONT_FOLLOW: u32 = 0x0200_0000;
19741974
pub const IN_ISDIR: u32 = 0x4000_0000;
19751975
pub const IN_ONESHOT: u32 = 0x8000_0000;
19761976

1977-
pub const IN_ALL_EVENTS: u32 = (IN_ACCESS
1977+
pub const IN_ALL_EVENTS: u32 = IN_ACCESS
19781978
| IN_MODIFY
19791979
| IN_ATTRIB
19801980
| IN_CLOSE_WRITE
@@ -1985,7 +1985,7 @@ pub const IN_ALL_EVENTS: u32 = (IN_ACCESS
19851985
| IN_DELETE
19861986
| IN_CREATE
19871987
| IN_DELETE_SELF
1988-
| IN_MOVE_SELF);
1988+
| IN_MOVE_SELF;
19891989

19901990
pub const IN_CLOEXEC: ::c_int = O_CLOEXEC;
19911991
pub const IN_NONBLOCK: ::c_int = O_NONBLOCK;

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,12 @@ pub const LC_ADDRESS: ::c_int = 9;
372372
pub const LC_TELEPHONE: ::c_int = 10;
373373
pub const LC_MEASUREMENT: ::c_int = 11;
374374
pub const LC_IDENTIFICATION: ::c_int = 12;
375-
pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
376-
pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
377-
pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
378-
pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
379-
pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
380-
pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
375+
pub const LC_PAPER_MASK: ::c_int = 1 << LC_PAPER;
376+
pub const LC_NAME_MASK: ::c_int = 1 << LC_NAME;
377+
pub const LC_ADDRESS_MASK: ::c_int = 1 << LC_ADDRESS;
378+
pub const LC_TELEPHONE_MASK: ::c_int = 1 << LC_TELEPHONE;
379+
pub const LC_MEASUREMENT_MASK: ::c_int = 1 << LC_MEASUREMENT;
380+
pub const LC_IDENTIFICATION_MASK: ::c_int = 1 << LC_IDENTIFICATION;
381381
pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
382382
| ::LC_NUMERIC_MASK
383383
| ::LC_TIME_MASK
@@ -747,12 +747,12 @@ pub const NFT_CMP_GTE: ::c_int = 5;
747747
pub const NFT_RANGE_EQ: ::c_int = 0;
748748
pub const NFT_RANGE_NEQ: ::c_int = 1;
749749

750-
pub const NFT_LOOKUP_F_INV: ::c_int = (1 << 0);
750+
pub const NFT_LOOKUP_F_INV: ::c_int = 1 << 0;
751751

752752
pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
753753
pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
754754

755-
pub const NFT_DYNSET_F_INV: ::c_int = (1 << 0);
755+
pub const NFT_DYNSET_F_INV: ::c_int = 1 << 0;
756756

757757
pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
758758
pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
@@ -807,13 +807,13 @@ pub const NFT_CT_BYTES: ::c_int = 15;
807807
pub const NFT_LIMIT_PKTS: ::c_int = 0;
808808
pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
809809

810-
pub const NFT_LIMIT_F_INV: ::c_int = (1 << 0);
810+
pub const NFT_LIMIT_F_INV: ::c_int = 1 << 0;
811811

812812
pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
813813
pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
814814
pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
815815

816-
pub const NFT_QUOTA_F_INV: ::c_int = (1 << 0);
816+
pub const NFT_QUOTA_F_INV: ::c_int = 1 << 0;
817817

818818
pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
819819
pub const NFT_REJECT_TCP_RST: ::c_int = 1;

0 commit comments

Comments
 (0)