src/SDL_error.c
changeset 10403 a0c76d344583
parent 10396 fa4e35434a9c
child 10643 930938c7ca82
equal deleted inserted replaced
10402:48b40c223503 10403:a0c76d344583
   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 #ifdef __GNUC__
   119 #pragma GCC diagnostic push
   120 #pragma GCC diagnostic push
   120 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
   121 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
       
   122 #endif
   121 /* This function has a bit more overhead than most error functions
   123 /* This function has a bit more overhead than most error functions
   122    so that it supports internationalization and thread-safe errors.
   124    so that it supports internationalization and thread-safe errors.
   123 */
   125 */
   124 static char *
   126 static char *
   125 SDL_GetErrorMsg(char *errstr, int maxlen)
   127 SDL_GetErrorMsg(char *errstr, int maxlen)
   216 
   218 
   217         *msg = 0;               /* NULL terminate the string */
   219         *msg = 0;               /* NULL terminate the string */
   218     }
   220     }
   219     return (errstr);
   221     return (errstr);
   220 }
   222 }
       
   223 #ifdef __GNUC__
   221 #pragma GCC diagnostic pop
   224 #pragma GCC diagnostic pop
       
   225 #endif
   222 
   226 
   223 /* Available for backwards compatibility */
   227 /* Available for backwards compatibility */
   224 const char *
   228 const char *
   225 SDL_GetError(void)
   229 SDL_GetError(void)
   226 {
   230 {