Skip to content

Commit 9c54241

Browse files
[SYCL] Fix unused parameter in getELFHeaderType (#6263)
Signed-off-by: Larsen, Steffen <[email protected]>
1 parent f0283fc commit 9c54241

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sycl/source/detail/pi.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,9 @@ DeviceBinaryImage::getProperty(const char *PropName) const {
686686

687687
// Returns the e_type field from an ELF image.
688688
static uint16_t getELFHeaderType(const unsigned char *ImgData, size_t ImgSize) {
689+
(void)ImgSize;
690+
assert(ImgSize >= 18 && "Not enough bytes to have an ELF header type.");
691+
689692
bool IsBigEndian = ImgData[5] == 2;
690693
if (IsBigEndian)
691694
return (static_cast<uint16_t>(ImgData[16]) << 8) |

0 commit comments

Comments
 (0)