diff options
author | Jaeseung Ha <ipknhama@gmail.com> | 2017-12-25 02:29:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-25 02:29:25 +0900 |
commit | 49bd1c27975ec3e21ba74887584e3419f71e8111 (patch) | |
tree | c4d5c220c352ecb3c91d62ecb465fdb376abe534 /include | |
parent | ca48f5c801752b9d9378d4c769e8f86255754566 (diff) | |
parent | 83bd8c09a09073ad4617dcb42d3f8253d324d9c6 (diff) | |
download | crow-49bd1c27975ec3e21ba74887584e3419f71e8111.tar.gz crow-49bd1c27975ec3e21ba74887584e3419f71e8111.zip |
Merge pull request #261 from erikaldsund/fix_warning_in_websocket_h
Fixed warning in websocket.h: right shift count >= width of type
Diffstat (limited to 'include')
-rw-r--r-- | include/crow/websocket.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/crow/websocket.h b/include/crow/websocket.h index 58b9a7e..c2dc3f8 100644 --- a/include/crow/websocket.h +++ b/include/crow/websocket.h @@ -152,7 +152,7 @@ namespace crow else { buf[1] += 127; - *(uint64_t*)(buf+2) = ((1==htonl(1)) ? (uint64_t)size : ((uint64_t)htonl((size) & 0xFFFFFFFF) << 32) | htonl((size) >> 32)); + *reinterpret_cast<uint64_t*>(buf+2) = ((1==htonl(1)) ? static_cast<uint64_t>(size) : (static_cast<uint64_t>(htonl((size) & 0xFFFFFFFF)) << 32) | htonl(static_cast<uint64_t>(size) >> 32)); return {buf, buf+10}; } } |