Commit e022e5ac authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Do not call grib_get_length when HAVE_LIBGRIB_API is undefined.

parent 5540812e
...@@ -691,14 +691,16 @@ int cdiGribIterator_getLong(CdiGribIterator *me, const char *key, long *result) ...@@ -691,14 +691,16 @@ int cdiGribIterator_getLong(CdiGribIterator *me, const char *key, long *result)
*/ */
int cdiGribIterator_getLength(CdiGribIterator *me, const char *key, size_t *result) int cdiGribIterator_getLength(CdiGribIterator *me, const char *key, size_t *result)
{ {
#ifdef HAVE_LIBGRIB_API
#ifdef HAVE_GRIB_GET_LENGTH #ifdef HAVE_GRIB_GET_LENGTH
return grib_get_length(me->gribHandle, key, result); return grib_get_length(me->gribHandle, key, result);
#elif defined(HAVE_LIBGRIB_API) #else
(void)me; (void)me;
(void)key; (void)key;
(void)result; (void)result;
Error("grib_get_length() is not available, so cdiGribIterator_getLength() can't be used"); Error("grib_get_length() is not available, so cdiGribIterator_getLength() can't be used");
return -1; return -1;
#endif
#else #else
(void)me; (void)me;
(void)key; (void)key;
......
Markdown is supported
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