From 368a61b6a887d4e4f2b3b4ca44bdd536759e9951 Mon Sep 17 00:00:00 2001 From: Avril Date: Wed, 19 May 2021 00:03:02 +0100 Subject: [PATCH] remove useless cast --- Makefile | 2 +- src/bits.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6bf6a57..e0e0284 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ SRC_CXX = $(wildcard src/*.cpp) INCLUDE=include -COMMON_FLAGS= -W -Wall -pedantic -fno-strict-aliasing $(addprefix -I,$(INCLUDE)) +COMMON_FLAGS= -W -Wall -Wstrict-aliasing -Wextra -pedantic -fno-strict-aliasing $(addprefix -I,$(INCLUDE)) MARCH?= -march=native OPT_FLAGS?= $(MARCH) -fgraphite -fopenmp -floop-parallelize-all -ftree-parallelize-loops=4 \ diff --git a/src/bits.c b/src/bits.c index 0a8e6f0..bb6db02 100644 --- a/src/bits.c +++ b/src/bits.c @@ -30,7 +30,7 @@ static int fwrite_all(const void* _buf, size_t sz, size_t num, FILE* out) static void pbits(char out[restrict 8], unsigned char byte, const char bit[static 2]) { - for(register int i=8; i --> 0; byte >>= 1) *out++=((int)bit[byte & 1]); + for(register int i=8; i --> 0; byte >>= 1) *out++=bit[byte & 1]; //TODO: In explicitly threaded version, we can use an atomic (atomic.h) 64-bit integer `store()` to output those 8 bytes in `out`, which will be re-cast as `uint64_t out[restrict 1]` }