Commit da905b57 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix illegal cast.

* Casting from 'type **' to 'const type **' is not allowed by C.
parent b04bded1
......@@ -166,7 +166,9 @@ CdiGribIterator *cdiGribIterator_deserialize(const char *description)
const char *savedStart = description;
long long decodedOffset = strtoll(description, (char**)&description, 0); //The cast is a workaround for the wrong signature of strtoll() (it should have been `long long strtoll(const char*, const char**, int)`, not `long long strtoll(const char*, char**, int)`.
char *description_ = (char *)description;
long long decodedOffset = strtoll(description, &description_, 0);
description = description_;
me->fileOffset = (off_t)decodedOffset;
if(savedStart == description) goto closeFile;
if((unsigned long long)decodedOffset > (unsigned long long)me->fileOffset) goto closeFile;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment