aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-01-15 12:33:05 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-01-15 12:39:21 +0000
commit3511b96448128a596edd48b2ae13bf6bc6ac6f56 (patch)
tree5c9bfd4c7c38fc1d1fdaa41f1a37d88736b89e1b
parentefreet - fix warnings on windows to do with size casting (diff)
downloadefl-3511b96448128a596edd48b2ae13bf6bc6ac6f56.tar.gz
emile+ tgv saver - stop using deprecated lz4 functions to remove warnings
-rw-r--r--src/lib/emile/emile_compress.c12
-rw-r--r--src/modules/evas/image_savers/tgv/evas_image_save_tgv.c10
2 files changed, 13 insertions, 9 deletions
diff --git a/src/lib/emile/emile_compress.c b/src/lib/emile/emile_compress.c
index 0d2e605795..e744d3f93f 100644
--- a/src/lib/emile/emile_compress.c
+++ b/src/lib/emile/emile_compress.c
@@ -52,9 +52,9 @@ emile_compress(const Eina_Binbuf *data,
switch (t)
{
case EMILE_LZ4:
- length = LZ4_compress((const char *)eina_binbuf_string_get(data),
- compact,
- eina_binbuf_length_get(data));
+ length = LZ4_compress_default
+ ((const char *)eina_binbuf_string_get(data), compact,
+ eina_binbuf_length_get(data), length);
/* It is going to be smaller and should never fail, if it does you are in deep poo. */
temp = realloc(compact, length);
if (temp) compact = temp;
@@ -64,9 +64,9 @@ emile_compress(const Eina_Binbuf *data,
break;
case EMILE_LZ4HC:
- length = LZ4_compressHC((const char *)eina_binbuf_string_get(data),
- compact,
- eina_binbuf_length_get(data));
+ length = LZ4_compress_HC
+ ((const char *)eina_binbuf_string_get(data), compact,
+ eina_binbuf_length_get(data), length, 16);
temp = realloc(compact, length);
if (temp) compact = temp;
diff --git a/src/modules/evas/image_savers/tgv/evas_image_save_tgv.c b/src/modules/evas/image_savers/tgv/evas_image_save_tgv.c
index aa0a82b943..9fee4de364 100644
--- a/src/modules/evas/image_savers/tgv/evas_image_save_tgv.c
+++ b/src/modules/evas/image_savers/tgv/evas_image_save_tgv.c
@@ -125,7 +125,8 @@ _save_direct_tgv(RGBA_Image *im, const char *file, int compress)
buffer_size = LZ4_compressBound(etc_data_size);
buffer = malloc(buffer_size);
if (!buffer) goto on_error;
- data_size = LZ4_compressHC((char *) data, (char *) buffer, etc_data_size);
+ data_size = LZ4_compress_HC
+ ((char *)data, (char *)buffer, etc_data_size, buffer_size, 16);
}
else
{
@@ -486,8 +487,11 @@ evas_image_save_file_tgv(RGBA_Image *im,
if (compress)
{
- wlen = LZ4_compressHC((char *) buffer, (char *) comp,
- block_count * etc_block_size);
+ wlen = LZ4_compress_HC
+ ((char *)buffer, (char *)comp,
+ block_count * etc_block_size,
+ LZ4_compressBound(block_count * etc_block_size),
+ 16);
}
else
{