MSVC: Provide implementations of [un]setenv()
[platform/upstream/libxkbcommon.git] / test / log.c
index 08de3d8..384fabc 100644 (file)
  * DEALINGS IN THE SOFTWARE.
  */
 
+#include "config.h"
+
 #include "test.h"
 #include "context.h"
 
+#ifdef __GNUC__
 #pragma GCC diagnostic ignored "-Wmissing-format-attribute"
+#endif
 
 static const char *
 log_level_to_string(enum xkb_log_level level)
@@ -74,7 +78,7 @@ main(void)
     assert(ret == 0);
     ret = setenv("XKB_LOG_VERBOSITY", "5", 1);
     assert(ret == 0);
-    ctx = xkb_context_new(0);
+    ctx = test_get_context(0);
     assert(ctx);
 
     darray_init(log_string);