mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Add __maybe_unused macro and use to stop warnings from lzma dummy allocs.
This commit is contained in:
parent
f225f9f173
commit
e6ae7c528a
|
|
@ -83,6 +83,7 @@ AM_CONDITIONAL([STATIC], [test "x$static" = "xyes"])
|
||||||
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/mman.h)
|
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/mman.h)
|
||||||
AC_CHECK_HEADERS(ctype.h errno.h sys/resource.h)
|
AC_CHECK_HEADERS(ctype.h errno.h sys/resource.h)
|
||||||
AC_CHECK_HEADERS(endian.h sys/endian.h arpa/inet.h)
|
AC_CHECK_HEADERS(endian.h sys/endian.h arpa/inet.h)
|
||||||
|
AC_CHECK_HEADERS(alloca.h)
|
||||||
|
|
||||||
AC_TYPE_OFF_T
|
AC_TYPE_OFF_T
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
#ifndef LRZIP_PRIV_H
|
#ifndef LRZIP_PRIV_H
|
||||||
#define LRZIP_PRIV_H
|
#define LRZIP_PRIV_H
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#define NUM_STREAMS 2
|
#define NUM_STREAMS 2
|
||||||
#define STREAM_BUFSIZE (1024 * 1024 * 10)
|
#define STREAM_BUFSIZE (1024 * 1024 * 10)
|
||||||
|
|
||||||
|
|
@ -117,6 +119,7 @@ extern int errno;
|
||||||
|
|
||||||
#define likely(x) __builtin_expect(!!(x), 1)
|
#define likely(x) __builtin_expect(!!(x), 1)
|
||||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||||
|
#define __maybe_unused __attribute__((unused))
|
||||||
|
|
||||||
typedef long long int i64;
|
typedef long long int i64;
|
||||||
typedef uint32_t u32;
|
typedef uint32_t u32;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#include "LzFindMt.h"
|
#include "LzFindMt.h"
|
||||||
|
|
||||||
|
#include "lrzip.h"
|
||||||
|
|
||||||
void MtSync_Construct(CMtSync *p)
|
void MtSync_Construct(CMtSync *p)
|
||||||
{
|
{
|
||||||
p->wasCreated = False;
|
p->wasCreated = False;
|
||||||
|
|
@ -454,7 +456,7 @@ void MatchFinderMt_Destruct(CMatchFinderMt *p, ISzAlloc *alloc)
|
||||||
static unsigned MY_STD_CALL HashThreadFunc2(void *p) { HashThreadFunc((CMatchFinderMt *)p); return 0; }
|
static unsigned MY_STD_CALL HashThreadFunc2(void *p) { HashThreadFunc((CMatchFinderMt *)p); return 0; }
|
||||||
static unsigned MY_STD_CALL BtThreadFunc2(void *p)
|
static unsigned MY_STD_CALL BtThreadFunc2(void *p)
|
||||||
{
|
{
|
||||||
Byte allocaDummy[0x180];
|
__maybe_unused Byte allocaDummy[0x180];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
allocaDummy[i] = (Byte)i;
|
allocaDummy[i] = (Byte)i;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@
|
||||||
#include "LzFindMt.h"
|
#include "LzFindMt.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "lrzip.h"
|
||||||
|
|
||||||
#ifdef SHOW_STAT
|
#ifdef SHOW_STAT
|
||||||
static int ttt = 0;
|
static int ttt = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -2156,7 +2158,7 @@ static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress)
|
||||||
SRes res = SZ_OK;
|
SRes res = SZ_OK;
|
||||||
|
|
||||||
#ifndef _7ZIP_ST
|
#ifndef _7ZIP_ST
|
||||||
Byte allocaDummy[0x300];
|
__maybe_unused Byte allocaDummy[0x300];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
allocaDummy[i] = (Byte)i;
|
allocaDummy[i] = (Byte)i;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue