Replace int with ptrdiff_t to store the result of pointer subtraction

This commit is contained in:
Icy Defiance 2016-01-06 19:39:48 -05:00
parent dd6e034cba
commit b1c272b93a

View File

@ -8,7 +8,7 @@ static int _glewExtensionCompare(const void *a, const void *b)
static GLboolean *_glewGetExtensionString(const char *name) static GLboolean *_glewGetExtensionString(const char *name)
{ {
const char **n = (const char **) bsearch(name, _glewExtensionLookup, sizeof(_glewExtensionLookup)/sizeof(char *)-1, sizeof(char *), _glewExtensionCompare); const char **n = (const char **) bsearch(name, _glewExtensionLookup, sizeof(_glewExtensionLookup)/sizeof(char *)-1, sizeof(char *), _glewExtensionCompare);
int i; ptrdiff_t i;
if (n) if (n)
{ {
@ -22,7 +22,7 @@ static GLboolean *_glewGetExtensionString(const char *name)
static GLboolean *_glewGetExtensionEnable(const char *name) static GLboolean *_glewGetExtensionEnable(const char *name)
{ {
const char **n = (const char **) bsearch(name, _glewExtensionLookup, sizeof(_glewExtensionLookup)/sizeof(char *)-1, sizeof(char *), _glewExtensionCompare); const char **n = (const char **) bsearch(name, _glewExtensionLookup, sizeof(_glewExtensionLookup)/sizeof(char *)-1, sizeof(char *), _glewExtensionCompare);
int i; ptrdiff_t i;
if (n) if (n)
{ {