mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
Fix a few GCC compile warnings
This commit is contained in:
parent
5147674980
commit
c9372c3699
@ -169,7 +169,7 @@ add_hash(size_t hash, const Key &key) {
|
||||
#ifdef _DEBUG
|
||||
// We assume that the sequence is laid out sequentially in memory.
|
||||
if (key.size() > 0) {
|
||||
assert(&key[key.size() - 1] - &key[0] == key.size() - 1);
|
||||
assert(&key[key.size() - 1] - &key[0] == (ptrdiff_t)key.size() - 1);
|
||||
}
|
||||
#endif
|
||||
size_t num_bytes = (key.size() * sizeof(key[0]));
|
||||
|
@ -403,6 +403,9 @@ unlock_and_do_task() {
|
||||
Thread *current_thread = Thread::get_current_thread();
|
||||
nassertr(current_thread->_current_task == nullptr, DS_interrupt);
|
||||
|
||||
#ifdef __GNUC__
|
||||
__attribute__((unused))
|
||||
#endif
|
||||
void *ptr = AtomicAdjust::compare_and_exchange_ptr
|
||||
(current_thread->_current_task, nullptr, (TypedReferenceCount *)this);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user