Shantanu Shinde
Shantanu Shinde

Reputation: 1012

Declaration of index in string.h overshadowed by cJSON.h

I am trying to make a C++ program that makes use of the string.h and cJSON library. But when I build it, I get warning saying:

cJSON.c:1743: warning: declaration of 'index' shadows a global declaration
string.h:487: warning: shadowed declaration is here

These warning doesn't really affect the functionality of the program and the program runs as expected. But I am trying to build the program using AzDo pipelines for exporting it and the AzDo pipelines fails builds on warnings. So, I need to find a way to resolve these warnings. What can be the best way to resolve this?

Edit: cJSON.c 1743 line is this: static cJSON* get_array_item(const cJSON *array, size_t index) string.h 487 line is this: extern char *index (__const char *__s, int __c)

Upvotes: 0

Views: 71

Answers (0)

Related Questions