The old way of doing if(parameter); elicits other warnings such as if without a body.
While one could "fix" that in clang with placing the ; on the next line, using
SXE_UNUSED seems much saner, as it coveys intent.
* src/ent/ent-mpc.c: move prototype of mpc_set_ui_fr to ent-mpc.h
* src/ent/ent-mpc.h: declare mpc_set_ui_fr for usage by alloc.c
* src/ent/ent-float.c (mark_float): Removed if, marked as SXE_UNUSED
* src/ent/ent-float.c (float_equal): ditto
* src/ent/ent-float.c (ent_rem_FLOAT_T): ditto
* src/ent/ent-float.c (ent_rem_FLOAT_T_INT_T): ditto
* src/ent/ent-gaussian.c (bigg_equal): ditto.
* src/ent/ent-gaussian.c (bigg_hash): ditto.
* src/ent/ent-gaussian.c (bigg_mark): ditto.
* src/ent/ent-gaussian.c (bigg_finalise): ditto.
* src/ent/ent-indef.c (indef_hash): ditto.
* src/ent/ent-mpc.c (bigc_finalise): ditto.
* src/ent/ent-mpfr.c (bigfr_finalise): ditto.
* src/ent/ent.c (default_real_precision_changed): ditto.
* src/alloc.c: include ent-mpc.h when it is defined so that bigc uses the
proper definitions/prototypes
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
/*** Big complex numbers with correct rounding ***/
#if defined HAVE_MPC && defined WITH_MPC || \
defined HAVE_PSEUC && defined WITH_PSEUC
+#include <ent/ent-mpc.h>
DECLARE_FIXED_TYPE_ALLOC(bigc, Lisp_Bigc);
#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_bigc 250
\f
static Lisp_Object
-mark_float(Lisp_Object obj)
+mark_float(Lisp_Object SXE_UNUSED(obj))
{
return Qnil;
-
- if (obj);
}
static inline int
-float_equal(Lisp_Object obj1, Lisp_Object obj2, int depth)
+float_equal(Lisp_Object obj1, Lisp_Object obj2, int SXE_UNUSED(depth))
{
return (ent_float(obj1) == ent_float(obj2));
-
- if (depth);
}
static inline unsigned long
}
static inline Lisp_Object
-ent_rem_FLOAT_T(Lisp_Object l, Lisp_Object r)
+ent_rem_FLOAT_T(Lisp_Object SXE_UNUSED(l), Lisp_Object SXE_UNUSED(r))
{
- if (l);
return make_float(0.0);
}
static inline Lisp_Object
-ent_rem_FLOAT_T_INT_T(Lisp_Object l, Lisp_Object r)
+ent_rem_FLOAT_T_INT_T(Lisp_Object SXE_UNUSED(l), Lisp_Object SXE_UNUSED(r))
{
- if (l);
return make_float(0.0);
}
}
static int
-bigg_equal(Lisp_Object obj1, Lisp_Object obj2, int depth)
+bigg_equal(Lisp_Object obj1, Lisp_Object obj2, int SXE_UNUSED(depth))
{
return bigg_eql(XBIGG_DATA(obj1), XBIGG_DATA(obj2));
-
- /* less warnings */
- if (depth);
}
static unsigned long
-bigg_hash(Lisp_Object obj, int depth)
+bigg_hash(Lisp_Object obj, int SXE_UNUSED(depth))
{
return bigg_hashcode(XBIGG_DATA(obj));
-
- /* less warnings */
- if (depth);
}
static Lisp_Object
-bigg_mark(Lisp_Object obj)
+bigg_mark(Lisp_Object SXE_UNUSED(obj))
{
return Qnil;
-
- /* less warnings */
- if (obj == Qnil);
}
static void
-bigg_finalise(void *header, int for_disksave)
+bigg_finalise(void *SXE_UNUSED(header), int for_disksave)
{
if (for_disksave)
signal_simple_error
("Can't dump an emacs containing "
"pseudo-gaussian objects",Qt);
-
- /* less warnings */
- if (header);
}
static const struct lrecord_description bigg_description[] = {
}
static unsigned long
-indef_hash (Lisp_Object obj, int depth)
+indef_hash (Lisp_Object obj, int SXE_UNUSED(depth))
{
return (unsigned long)XINDEF_DATA(obj);
-
- /* less warnings */
- if (depth);
}
static const struct lrecord_description indef_description[] = {
}
static void
-bigc_finalise (void *header, int for_disksave)
+bigc_finalise (void *SXE_UNUSED(header), int for_disksave)
{
if (for_disksave)
signal_simple_error
("Can't dump an emacs containing MPC objects",Qt);
-
- /* less warnings */
- if (header);
}
static const struct lrecord_description bigc_description[] = {
#if ! defined(HAVE_MPC_SET_UI_FR) || ! HAVE_MPC_SET_UI_FR
#if defined(MPC_SET_X_Y)
-int mpc_set_ui_fr (mpc_t rop, unsigned long int re, mpfr_t im, mpc_rnd_t rnd);
int mpc_set_ui_fr (mpc_t rop, unsigned long int re, mpfr_t im, mpc_rnd_t rnd)
MPC_SET_X_Y (ui, fr, rop, re, im, rnd);
#else
extern Bufbyte *bigc_to_string(bigc, int);
/***** Bigc: converting assignments *****/
+#if ! defined(HAVE_MPC_SET_UI_FR) || ! HAVE_MPC_SET_UI_FR
+#if defined(MPC_SET_X_Y)
+int mpc_set_ui_fr (mpc_t rop, unsigned long int re, mpfr_t im, mpc_rnd_t rnd);
+#else
+#error Cannot derived mpc_set_ui_fr without MPC_SET_X_Y!
+#endif
+#endif
+
#define bigc_set(f1, f2) mpc_set(f1, f2, GMP_RNDN)
#define bigc_set_long(f, l) mpc_set_si(f, l, GMP_RNDN)
#define bigc_set_ulong(f, l) mpc_set_ui(f, l, GMP_RNDN)
}
static void
-bigfr_finalise (void *header, int for_disksave)
+bigfr_finalise (void *SXE_UNUSED(header), int for_disksave)
{
if (for_disksave)
signal_simple_error
("Can't dump an emacs containing MPFR objects", Qt);
-
- /* less warnings */
- if (header);
}
static const struct lrecord_description bigfr_description[] = {
}
static int
-default_real_precision_changed (Lisp_Object sym, Lisp_Object *val,
- Lisp_Object in_object,
- int flags)
+default_real_precision_changed (Lisp_Object SXE_UNUSED(sym), Lisp_Object *val,
+ Lisp_Object SXE_UNUSED(in_object),
+ int SXE_UNUSED(flags))
{
unsigned long prec;
bigfr_set_default_prec(prec);
#endif
return 0;
-
- /* less warnings */
- if (sym == Qnil);
- if (in_object == Qnil);
- if (flags);
}
DEFUN("real", Freal, 1, 2, 0, /*