8249875: GCC 10 warnings -Wtype-limits with JFR code

Reviewed-by: mgronlun
This commit is contained in:
Yasumasa Suenaga 2020-07-23 12:19:59 +09:00
parent 9cf96bf398
commit 401d3ea9bc
2 changed files with 3 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -135,7 +135,6 @@ T* JfrDoublyLinkedList<T>::remove(T* const node) {
prev->set_next(next);
}
--_count;
assert(_count >= 0, "invariant");
assert(!in_list(node), "still in list error");
return node;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -83,7 +83,7 @@ class JfrBasicHashtable : public CHeapObj<mtTracing> {
size_t hash_to_index(uintptr_t full_hash) const {
const uintptr_t h = full_hash % _table_size;
assert(h >= 0 && h < _table_size, "Illegal hash value");
assert(h < _table_size, "Illegal hash value");
return (size_t)h;
}
size_t entry_size() const { return _entry_size; }