diff options
| author | Tyge Løvset <[email protected]> | 2021-12-29 23:33:38 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-12-29 23:33:38 +0100 |
| commit | c0b0275c80752c812df7c52a98a72170d5fc3bcb (patch) | |
| tree | 530e5080035acdee77434186b9b79cb8c9faff66 /include/stc/cbits.h | |
| parent | 15e1dd79211828bcb8c2a809837b56397d65c6d9 (diff) | |
| download | STC-modified-c0b0275c80752c812df7c52a98a72170d5fc3bcb.tar.gz STC-modified-c0b0275c80752c812df7c52a98a72170d5fc3bcb.zip | |
Removed warnings for MS cl -W2 and clang -pedantic -std=c99. No functional changes.
Diffstat (limited to 'include/stc/cbits.h')
| -rw-r--r-- | include/stc/cbits.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/stc/cbits.h b/include/stc/cbits.h index a6ee3948..4fa8c146 100644 --- a/include/stc/cbits.h +++ b/include/stc/cbits.h @@ -107,9 +107,15 @@ STC_INLINE void cbits_reset(cbits *self, size_t i) { self->data64[i >> 6] &= ~(1ull << (i & 63));
}
+#ifdef _MSC_VER
+#pragma warning(disable: 4146) // unary minus operator applied to unsigned type
+#endif
STC_INLINE void cbits_set_value(cbits *self, size_t i, bool value) {
self->data64[i >> 6] ^= (-(uint64_t)value ^ self->data64[i >> 6]) & 1ull << (i & 63);
}
+#ifdef _MSC_VER
+#pragma warning(default: 4146)
+#endif
STC_INLINE void cbits_flip(cbits *self, size_t i) {
self->data64[i >> 6] ^= 1ull << (i & 63);
|
