aboutsummaryrefslogtreecommitdiff
path: root/c/enc/command.h
diff options
context:
space:
mode:
authorEugene Kliuchnikov <eustas@google.com>2018-03-29 10:37:07 +0200
committerGitHub <noreply@github.com>2018-03-29 10:37:07 +0200
commitc6333e1e79fb62ea088443f192293f964409b04e (patch)
tree667ea8cb15fdd649ebb65b70c6c003b56cc987e5 /c/enc/command.h
parent0f3c84e7458d2ef91a29fdf269e8ad016ae694ba (diff)
downloadbrotli-c6333e1e79fb62ea088443f192293f964409b04e.zip
brotli-c6333e1e79fb62ea088443f192293f964409b04e.tar.gz
brotli-c6333e1e79fb62ea088443f192293f964409b04e.tar.bz2
Fix MSVC compilation (#657)v1.0.4v1.0
* tell bazel not to pass strict options to a fancy compiler * fix signed-unsigned comparison warning found by MSVC
Diffstat (limited to 'c/enc/command.h')
-rw-r--r--c/enc/command.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/c/enc/command.h b/c/enc/command.h
index 6075dfe..3fcf186 100644
--- a/c/enc/command.h
+++ b/c/enc/command.h
@@ -145,11 +145,11 @@ static BROTLI_INLINE void InitInsertCommand(Command* self, size_t insertlen) {
static BROTLI_INLINE uint32_t CommandRestoreDistanceCode(
const Command* self, const BrotliDistanceParams* dist) {
- if ((self->dist_prefix_ & 0x3FF) <
+ if ((self->dist_prefix_ & 0x3FFu) <
BROTLI_NUM_DISTANCE_SHORT_CODES + dist->num_direct_distance_codes) {
- return self->dist_prefix_ & 0x3FF;
+ return self->dist_prefix_ & 0x3FFu;
} else {
- uint32_t dcode = self->dist_prefix_ & 0x3FF;
+ uint32_t dcode = self->dist_prefix_ & 0x3FFu;
uint32_t nbits = self->dist_prefix_ >> 10;
uint32_t extra = self->dist_extra_;
uint32_t postfix_mask = (1U << dist->distance_postfix_bits) - 1U;