Just follow gcc's advices here.
ATTRIB_CRITERION_ATLEAST,
ATTRIB_CRITERION_MASK,
ATTRIB_CRITERION_SPECIAL,
- ATTRIB_CRITERION_IGNORE,
+ ATTRIB_CRITERION_IGNORE
};
_EGL_NUM_RESOURCES
};
+/* this cannot and need not go into egltypedefs.h */
+typedef enum _egl_resource_type _EGLResourceType;
/**
mainFunc = (_EGLMain_t) GetProcAddress(lib, "_eglMain");
#elif defined(_EGL_PLATFORM_POSIX)
if (lib) {
- mainFunc = (_EGLMain_t) dlsym(lib, "_eglMain");
+ union {
+ _EGLMain_t func;
+ void *ptr;
+ } tmp = { NULL };
+ /* direct cast gives a warning when compiled with -pedantic */
+ tmp.ptr = dlsym(lib, "_eglMain");
+ mainFunc = tmp.func;
if (!mainFunc)
error = dlerror();
}
#include "eglcompiler.h"
-typedef enum _egl_resource_type _EGLResourceType;
-
typedef struct _egl_api _EGLAPI;
typedef struct _egl_config _EGLConfig;