From bf8e01d237a75eabd13a086e58083c2d7701968c Mon Sep 17 00:00:00 2001 From: Hugues Delorme Date: Fri, 6 Jan 2017 18:29:46 +0100 Subject: [PATCH] gmio_core: fix GCC compilation errors --- src/gmio_core/internal/zip_utils.c | 10 +++++----- src/gmio_core/internal/zip_utils.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gmio_core/internal/zip_utils.c b/src/gmio_core/internal/zip_utils.c index fa5f209..686d327 100644 --- a/src/gmio_core/internal/zip_utils.c +++ b/src/gmio_core/internal/zip_utils.c @@ -161,7 +161,7 @@ size_t gmio_zip_read_local_file_header( int *ptr_error) { uint8_t buff[GMIO_ZIP_SIZE_LOCAL_FILE_HEADER]; - uint8_t* buffit = buff; + const uint8_t* buffit = buff; const size_t read_len = gmio_stream_read_bytes(stream, buff, sizeof(buff)); if (!gmio_zip_read_checkhelper(stream, read_len, sizeof(buff))) @@ -251,7 +251,7 @@ size_t gmio_zip_read_central_directory_header( int *ptr_error) { uint8_t buff[GMIO_ZIP_SIZE_CENTRAL_DIRECTORY_HEADER]; - uint8_t* buffit = buff; + const uint8_t* buffit = buff; const size_t read_len = gmio_stream_read_bytes(stream, buff, sizeof(buff)); if (!gmio_zip_read_checkhelper(stream, read_len, sizeof(buff))) @@ -311,7 +311,7 @@ size_t gmio_zip_read_end_of_central_directory_record( int *ptr_error) { uint8_t buff[GMIO_ZIP_SIZE_END_OF_CENTRAL_DIRECTORY_RECORD]; - uint8_t* buffit = buff; + const uint8_t* buffit = buff; const size_t read_len = gmio_stream_read_bytes(stream, buff, sizeof(buff)); if (!gmio_zip_read_checkhelper(stream, read_len, sizeof(buff))) @@ -404,7 +404,7 @@ size_t gmio_zip_read_data_descriptor( int* ptr_error) { uint8_t buff[GMIO_ZIP_SIZE_DATA_DESCRIPTOR]; - uint8_t* buffit = buff; + const uint8_t* buffit = buff; const size_t read_len = gmio_stream_read_bytes(stream, buff, sizeof(buff)); if (!gmio_zip_read_checkhelper(stream, read_len, sizeof(buff))) @@ -427,7 +427,7 @@ size_t gmio_zip64_read_data_descriptor( { #ifdef GMIO_HAVE_INT64_TYPE uint8_t buff[GMIO_ZIP64_SIZE_DATA_DESCRIPTOR]; - uint8_t* buffit = buff; + const uint8_t* buffit = buff; const size_t read_len = gmio_stream_read_bytes(stream, buff, sizeof(buff)); if (!gmio_zip_read_checkhelper(stream, read_len, sizeof(buff))) diff --git a/src/gmio_core/internal/zip_utils.h b/src/gmio_core/internal/zip_utils.h index 1adbb2d..b085f07 100644 --- a/src/gmio_core/internal/zip_utils.h +++ b/src/gmio_core/internal/zip_utils.h @@ -246,7 +246,7 @@ struct gmio_zip_write_result { size_t written_len; }; -enum { GMIO_ZIP_UTILS_ERROR_TAG = 0xAA000000 }; +enum { GMIO_ZIP_UTILS_ERROR_TAG = 0x00AA0000 }; enum gmio_zip_utils_error { GMIO_ZIP_UTILS_ERROR_BAD_MAGIC = GMIO_ZIP_UTILS_ERROR_TAG + 0x01 };