Skip to content

Commit

Permalink
For now let's disable the shift-count-overflow warning
Browse files Browse the repository at this point in the history
In file included from /Users/runner/work/ThunderInterfaces/ThunderInterfaces/ThunderInterfaces/interfaces/IDRM.h:49:
/Users/runner/work/ThunderInterfaces/ThunderInterfaces/ThunderInterfaces/interfaces/../interfaces/DRMHelper.h:54:21: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
                tmp <<= 8;
                    ^   ~
/Users/runner/work/ThunderInterfaces/ThunderInterfaces/ThunderInterfaces/interfaces/../interfaces/DRMHelper.h:81:68: note: in instantiation of function template specialization 'BufferReader::Read<unsigned char>' requested here
    inline bool Read1(uint8_t* v) WARNING_RESULT_NOT_USED { return Read(v); }
                                                                   ^
1 error generated.
  • Loading branch information
VeithMetro authored Nov 5, 2024
1 parent 451dd17 commit 0d0344c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions interfaces/DRMHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class BufferReader {
BufferReader(const BufferReader&) = delete;
BufferReader& operator=(const BufferReader&) = delete;

PUSH_WARNING("-Wshift-count-overflow")
// Internal implementation of multi-byte reads
template <typename T>
bool Read(T* v)
Expand All @@ -59,6 +60,7 @@ class BufferReader {
}
return false;
}
POP_WARNING()

public:
inline BufferReader(const uint8_t* buf, size_t size)
Expand Down

0 comments on commit 0d0344c

Please sign in to comment.