diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2014-08-15 12:45:01 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2014-08-15 12:45:01 +0900 |
commit | 43a932ab3cc9ff16ee48667c89342c74805506a7 (patch) | |
tree | bf7aa3a1bb7666a9005c510f6fa57daf027eaaad | |
parent | 2098e8c85695afe8aced1eb0619e908899f963e6 (diff) | |
download | efl-43a932ab3cc9ff16ee48667c89342c74805506a7.tar.gz |
evas image loaders - silence noisy warnings that are just not needed
several loaders make too much noise when a file fails to load - almost
all of this is because the file isnt actually an image format file at
all, and an ap is just asking evas to try do a load to see if it is a
loadable image at all. this results in noisy strerr output that simply
shouldnt be there. so silence for loaders. @fix
-rw-r--r-- | src/modules/evas/loaders/dds/evas_image_load_dds.c | 3 | ||||
-rw-r--r-- | src/modules/evas/loaders/jp2k/evas_image_load_jp2k.c | 12 | ||||
-rw-r--r-- | src/modules/evas/loaders/xpm/evas_image_load_xpm.c | 28 |
3 files changed, 21 insertions, 22 deletions
diff --git a/src/modules/evas/loaders/dds/evas_image_load_dds.c b/src/modules/evas/loaders/dds/evas_image_load_dds.c index fb151ab407..69c92192e0 100644 --- a/src/modules/evas/loaders/dds/evas_image_load_dds.c +++ b/src/modules/evas/loaders/dds/evas_image_load_dds.c @@ -157,8 +157,7 @@ _dword_read(const char **m) return val; } -#define FAIL() do { fprintf(stderr, "DDS: ERROR at %s:%d\n", \ - __FUNCTION__, __LINE__); goto on_error; } while (0) +#define FAIL() do { /*fprintf(stderr, "DDS: ERROR at %s:%d\n", __FUNCTION__, __LINE__);*/ goto on_error; } while (0) static Eina_Bool evas_image_load_file_head_dds(void *loader_data, diff --git a/src/modules/evas/loaders/jp2k/evas_image_load_jp2k.c b/src/modules/evas/loaders/jp2k/evas_image_load_jp2k.c index 28200cee0a..ececb6d027 100644 --- a/src/modules/evas/loaders/jp2k/evas_image_load_jp2k.c +++ b/src/modules/evas/loaders/jp2k/evas_image_load_jp2k.c @@ -37,21 +37,21 @@ struct _Evas_Loader_Internal }; static void -_jp2k_error_cb(const char *msg, void *data EINA_UNUSED) +_jp2k_error_cb(const char *msg EINA_UNUSED, void *data EINA_UNUSED) { - ERR("OpenJPEG internal error: '%s'.", msg); +// ERR("OpenJPEG internal error: '%s'.", msg); } static void -_jp2k_warning_cb(const char *msg, void *data EINA_UNUSED) +_jp2k_warning_cb(const char *msg EINA_UNUSED, void *data EINA_UNUSED) { - WRN("OpenJPEG internal warning: '%s'.", msg); +// WRN("OpenJPEG internal warning: '%s'.", msg); } static void -_jp2k_info_cb(const char *msg, void *data EINA_UNUSED) +_jp2k_info_cb(const char *msg EINA_UNUSED, void *data EINA_UNUSED) { - INF("OpenJPEG internal information: '%s'.", msg); +// INF("OpenJPEG internal information: '%s'.", msg); } static Eina_Bool diff --git a/src/modules/evas/loaders/xpm/evas_image_load_xpm.c b/src/modules/evas/loaders/xpm/evas_image_load_xpm.c index 4a2ab2b5ab..cf9b9df075 100644 --- a/src/modules/evas/loaders/xpm/evas_image_load_xpm.c +++ b/src/modules/evas/loaders/xpm/evas_image_load_xpm.c @@ -168,7 +168,7 @@ evas_image_load_file_xpm(Eina_File *f, Evas_Image_Property *prop, void *pixels, *error = EVAS_LOAD_ERROR_CORRUPT_FILE; if (length < 9) { - ERR("XPM ERROR: file size, %zd, is to small", length); +// ERR("XPM ERROR: file size, %zd, is to small", length); goto on_error; } @@ -234,39 +234,39 @@ evas_image_load_file_xpm(Eina_File *f, Evas_Image_Property *prop, void *pixels, { /* Header */ if (sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp) != 4) - { - ERR("XPM ERROR: XPM file malformed header"); - *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + { +// ERR("XPM ERROR: XPM file malformed header"); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; goto on_error; - } + } if ((ncolors > 32766) || (ncolors < 1)) { ERR("XPM ERROR: XPM files with colors > 32766 or < 1 not supported"); - *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; goto on_error; } if ((cpp > 5) || (cpp < 1)) { - ERR("XPM ERROR: XPM files with characters per pixel > 5 or < 1not supported"); - *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + ERR("XPM ERROR: XPM files with characters per pixel > 5 or < 1not supported"); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; goto on_error; } if ((w > IMG_MAX_SIZE) || (w < 1)) { - ERR("XPM ERROR: Image width > IMG_MAX_SIZE or < 1 pixels for file"); - *error = EVAS_LOAD_ERROR_GENERIC; + ERR("XPM ERROR: Image width > IMG_MAX_SIZE or < 1 pixels for file"); + *error = EVAS_LOAD_ERROR_GENERIC; goto on_error; } if ((h > IMG_MAX_SIZE) || (h < 1)) { - ERR("XPM ERROR: Image height > IMG_MAX_SIZE or < 1 pixels for file"); - *error = EVAS_LOAD_ERROR_GENERIC; + ERR("XPM ERROR: Image height > IMG_MAX_SIZE or < 1 pixels for file"); + *error = EVAS_LOAD_ERROR_GENERIC; goto on_error; } if (IMG_TOO_BIG(w, h)) { ERR("XPM ERROR: Image just too big to ever allocate"); - *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto on_error; } @@ -275,7 +275,7 @@ evas_image_load_file_xpm(Eina_File *f, Evas_Image_Property *prop, void *pixels, cmap = malloc(sizeof(CMap) * ncolors); if (!cmap) { - *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto on_error; } } |