X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Fio%2FIOBufQueue.h;h=fb8653c6a35af59195dae63f313ad4e041546761;hb=HEAD;hp=5c627bc9f41e72f4bf3f4e51408dd096d4d67ae7;hpb=64072ab5f788cd1081bdd98ba6dbaabbcd1fafbd;p=folly.git diff --git a/folly/io/IOBufQueue.h b/folly/io/IOBufQueue.h index 5c627bc9..fb8653c6 100644 --- a/folly/io/IOBufQueue.h +++ b/folly/io/IOBufQueue.h @@ -1,5 +1,5 @@ /* - * Copyright 2017 Facebook, Inc. + * Copyright 2013-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -236,7 +236,8 @@ class IOBufQueue { void dcheckIntegrity() { // Tail start should always be less than tail end. - DCHECK_LE(data_.cachedRange.first, data_.cachedRange.second); + DCHECK_LE( + (void*)data_.cachedRange.first, (void*)data_.cachedRange.second); DCHECK( data_.cachedRange.first != nullptr || data_.cachedRange.second == nullptr); @@ -376,7 +377,9 @@ class IOBufQueue { */ void postallocate(uint64_t n) { dcheckCacheIntegrity(); - DCHECK_LE(cachePtr_->cachedRange.first + n, cachePtr_->cachedRange.second); + DCHECK_LE( + (void*)(cachePtr_->cachedRange.first + n), + (void*)cachePtr_->cachedRange.second); cachePtr_->cachedRange.first += n; } @@ -553,8 +556,10 @@ class IOBufQueue { void dcheckCacheIntegrity() const { // Tail start should always be less than tail end. - DCHECK_LE(tailStart_, cachePtr_->cachedRange.first); - DCHECK_LE(cachePtr_->cachedRange.first, cachePtr_->cachedRange.second); + DCHECK_LE((void*)tailStart_, (void*)cachePtr_->cachedRange.first); + DCHECK_LE( + (void*)cachePtr_->cachedRange.first, + (void*)cachePtr_->cachedRange.second); DCHECK( cachePtr_->cachedRange.first != nullptr || cachePtr_->cachedRange.second == nullptr); @@ -606,7 +611,8 @@ class IOBufQueue { if (tailStart_ != cachePtr_->cachedRange.first) { auto buf = head_->prev(); DCHECK_EQ( - buf->writableTail() + buf->tailroom(), cachePtr_->cachedRange.second); + (void*)(buf->writableTail() + buf->tailroom()), + (void*)cachePtr_->cachedRange.second); auto len = cachePtr_->cachedRange.first - tailStart_; buf->append(len); chainLength_ += len;