forked from QuasarApp/QtBigInt
fix warnings
This commit is contained in:
parent
9a3d18982e
commit
ac9c3d0b44
@ -50,7 +50,7 @@ see https://www.gnu.org/licenses/. */
|
|||||||
|
|
||||||
#include "mini-gmp.h"
|
#include "mini-gmp.h"
|
||||||
|
|
||||||
|
|
||||||
/* Macros */
|
/* Macros */
|
||||||
#define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT)
|
#define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT)
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ see https://www.gnu.org/licenses/. */
|
|||||||
|
|
||||||
const int mp_bits_per_limb = GMP_LIMB_BITS;
|
const int mp_bits_per_limb = GMP_LIMB_BITS;
|
||||||
|
|
||||||
|
|
||||||
/* Memory allocation and other helper functions. */
|
/* Memory allocation and other helper functions. */
|
||||||
static void
|
static void
|
||||||
gmp_die (const char *msg)
|
gmp_die (const char *msg)
|
||||||
@ -266,6 +266,8 @@ gmp_default_alloc (size_t size)
|
|||||||
static void *
|
static void *
|
||||||
gmp_default_realloc (void *old, size_t old_size, size_t new_size)
|
gmp_default_realloc (void *old, size_t old_size, size_t new_size)
|
||||||
{
|
{
|
||||||
|
UN_USED(old_size);
|
||||||
|
|
||||||
void * p;
|
void * p;
|
||||||
|
|
||||||
p = realloc (old, new_size);
|
p = realloc (old, new_size);
|
||||||
@ -279,6 +281,7 @@ gmp_default_realloc (void *old, size_t old_size, size_t new_size)
|
|||||||
static void
|
static void
|
||||||
gmp_default_free (void *p, size_t size)
|
gmp_default_free (void *p, size_t size)
|
||||||
{
|
{
|
||||||
|
UN_USED(size);
|
||||||
free (p);
|
free (p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ see https://www.gnu.org/licenses/. */
|
|||||||
|
|
||||||
This file defines the public interface. */
|
This file defines the public interface. */
|
||||||
|
|
||||||
#ifndef __MINI_GMP_H__
|
#ifndef MINI_GMP
|
||||||
#define __MINI_GMP_H__
|
#define MINI_GMP
|
||||||
|
|
||||||
/* For size_t */
|
/* For size_t */
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@ -45,6 +45,8 @@ see https://www.gnu.org/licenses/. */
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define UN_USED(X) (void)X
|
||||||
|
|
||||||
void mp_set_memory_functions (void *(*) (size_t),
|
void mp_set_memory_functions (void *(*) (size_t),
|
||||||
void *(*) (void *, size_t, size_t),
|
void *(*) (void *, size_t, size_t),
|
||||||
void (*) (void *, size_t));
|
void (*) (void *, size_t));
|
||||||
@ -295,4 +297,4 @@ void *mpz_export (void *, size_t *, int, size_t, int, size_t, const mpz_t);
|
|||||||
#if defined (__cplusplus)
|
#if defined (__cplusplus)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* __MINI_GMP_H__ */
|
#endif /* MINI_GMP */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user