diff options
author | Russ Cox <rsc@golang.org> | 2013-09-09 15:07:23 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2013-09-09 15:07:23 -0400 |
commit | 2baa9d634a3fb40b49b491f9cf8ebf8ac39235ec (patch) | |
tree | fb29f6a102f94f6785f76c4da563a6cd396aab5f /include | |
parent | 5f3a63756d90cb3b04cce2a6e1fb848ee109fdaf (diff) | |
download | go-2baa9d634a3fb40b49b491f9cf8ebf8ac39235ec.tar.gz |
build: remove various uses of C undefined behavior
If you thought gcc -ansi -pedantic was pedantic, just wait
until you meet clang -fsanitize=undefined.
I think this addresses all the reported "errors", but we'll
need another run to be sure.
all.bash still passes.
Update issue 5764
Dave, can you please try again?
R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/13334049
Diffstat (limited to 'include')
-rw-r--r-- | include/bio.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/bio.h b/include/bio.h index be4d8d80e..5506c7c32 100644 --- a/include/bio.h +++ b/include/bio.h @@ -79,7 +79,7 @@ struct Biobuf #define BGETLE2(bp)\ ((bp)->icount<=-2?((bp)->icount+=2,((bp)->ebuf[(bp)->icount-2])|((bp)->ebuf[(bp)->icount-1]<<8)):Bgetle2((bp))) #define BGETLE4(bp)\ - ((bp)->icount<=-4?((bp)->icount+=4,((bp)->ebuf[(bp)->icount-4])|((bp)->ebuf[(bp)->icount-3]<<8)|((bp)->ebuf[(bp)->icount-2]<<16)|((bp)->ebuf[(bp)->icount-1]<<24)):Bgetle4((bp))) + (int)((bp)->icount<=-4?((bp)->icount+=4,((bp)->ebuf[(bp)->icount-4])|((bp)->ebuf[(bp)->icount-3]<<8)|((bp)->ebuf[(bp)->icount-2]<<16)|((uint32)(bp)->ebuf[(bp)->icount-1]<<24)):Bgetle4((bp))) /* * These macros put 1-, 2-, and 4-byte integer values by writing the |