Skip to content

Commit

Permalink
uzlib(trezor): fix compilation with clang
Browse files Browse the repository at this point in the history
  • Loading branch information
mmilata committed May 10, 2023
1 parent a973bbc commit e63e8b8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/uzlib/tinflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
#include <assert.h>
#include "tinf.h"

#if defined(__GNUC__) && (__GNUC__ >= 5)
#define OPTIMIZE_O3 __attribute__((optimize("-O3")))
#else
#define OPTIMIZE_O3
#endif

#define UZLIB_DUMP_ARRAY(heading, arr, size) \
{ \
printf("%s", heading); \
Expand Down Expand Up @@ -549,7 +555,7 @@ void uzlib_uncompress_init(TINF_DATA *d, void *dict, unsigned int dictLen)
}

/* inflate next output bytes from compressed stream */
__attribute__((optimize("-O3")))
OPTIMIZE_O3
int uzlib_uncompress(TINF_DATA *d)
{
do {
Expand Down

0 comments on commit e63e8b8

Please sign in to comment.