mapi: Fix shared-glapi build with MSVC

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
This commit is contained in:
Jesse Natalie 2021-09-01 06:57:40 -07:00
parent d326d32e24
commit 92f515ad6e
3 changed files with 5 additions and 5 deletions

View file

@ -121,7 +121,7 @@ _glapi_add_dispatch( const char * const * function_names,
const struct mapi_stub *alias = NULL;
unsigned i;
(void) memset(function_stubs, 0, sizeof(function_stubs));
(void) memset((void*)function_stubs, 0, sizeof(function_stubs));
/* find the missing stubs, and decide the alias */
for (i = 0; function_names[i] != NULL && i < 8; i++) {

View file

@ -65,7 +65,7 @@ stub_compare(const void *key, const void *elem)
const struct mapi_stub *stub = (const struct mapi_stub *) elem;
const char *stub_name;
stub_name = &public_string_pool[(unsigned long) stub->name];
stub_name = &public_string_pool[(size_t) stub->name];
return strcmp(name, stub_name);
}
@ -193,7 +193,7 @@ stub_get_name(const struct mapi_stub *stub)
if (stub >= public_stubs &&
stub < public_stubs + ARRAY_SIZE(public_stubs))
name = &public_string_pool[(unsigned long) stub->name];
name = &public_string_pool[(size_t) stub->name];
else
name = (const char *) stub->name;

View file

@ -50,13 +50,13 @@ u_current_destroy(void);
void
u_current_set_table(const struct _glapi_table *tbl);
struct _glapi_table *
_GLAPI_EXPORT struct _glapi_table *
u_current_get_table_internal(void);
void
u_current_set_context(const void *ptr);
void *
_GLAPI_EXPORT void *
u_current_get_context_internal(void);
#endif /* _U_CURRENT_H_ */