src/SDL_error.c
changeset 10396 fa4e35434a9c
parent 9998 f67cf37e9cd4
child 10403 a0c76d344583
equal deleted inserted replaced
10395:99bdc4fc41ba 10396:fa4e35434a9c
   114     SDL_LogDebug(SDL_LOG_CATEGORY_ERROR, "%s", SDL_GetError());
   114     SDL_LogDebug(SDL_LOG_CATEGORY_ERROR, "%s", SDL_GetError());
   115 
   115 
   116     return -1;
   116     return -1;
   117 }
   117 }
   118 
   118 
       
   119 #pragma GCC diagnostic push
       
   120 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
   119 /* This function has a bit more overhead than most error functions
   121 /* This function has a bit more overhead than most error functions
   120    so that it supports internationalization and thread-safe errors.
   122    so that it supports internationalization and thread-safe errors.
   121 */
   123 */
   122 static char *
   124 static char *
   123 SDL_GetErrorMsg(char *errstr, int maxlen)
   125 SDL_GetErrorMsg(char *errstr, int maxlen)
   214 
   216 
   215         *msg = 0;               /* NULL terminate the string */
   217         *msg = 0;               /* NULL terminate the string */
   216     }
   218     }
   217     return (errstr);
   219     return (errstr);
   218 }
   220 }
       
   221 #pragma GCC diagnostic pop
   219 
   222 
   220 /* Available for backwards compatibility */
   223 /* Available for backwards compatibility */
   221 const char *
   224 const char *
   222 SDL_GetError(void)
   225 SDL_GetError(void)
   223 {
   226 {