return false;
}
- datap = (__m256i *)buf;
+ datap = buf;
/* Fold in parallel 16x 16-byte blocks into 8x 16-byte blocks */
if (bytes_read >= 16 * 8 * 2)
return false;
}
- datap = (__m512i *)buf;
+ datap = buf;
/* Fold in parallel 32x 16-byte blocks into 16x 16-byte blocks */
if (bytes_read >= 16 * 8 * 4)
}
/* Process multiples of 8 bytes */
- datap = (uint32_t *)buf;
+ datap = buf;
while (bytes_read >= 8)
{
uint32_t first = *datap++, second = *datap++;
return false;
}
- datap = (__m128i *)buf;
+ datap = buf;
/* Fold in parallel eight 16-byte blocks into four 16-byte blocks */
if (bytes_read >= 16 * 8)
/* Ignoring the device number here should be fine. */
/* The cast to uintmax_t prevents negative remainders
if st_ino is negative. */
- return (uintmax_t) p->st_ino % table_size;
+ return (uintmax_t) {p->st_ino} % table_size;
}
/* Compare two Src_to_dest entries.
if (ent_from_table != ent)
{
src_to_dest_free (ent);
- return (char *) ent_from_table->name;
+ return ent_from_table->name;
}
/* New key; insertion succeeded. */
{
diagnose (errno, _("failed to truncate to %jd bytes"
" in output file %s"),
- (intmax_t) output_offset, quoteaf (output_file));
+ (intmax_t) {output_offset}, quoteaf (output_file));
return EXIT_FAILURE;
}
}
devlist_hash (void const *x, size_t table_size)
{
struct devlist const *p = x;
- return (uintmax_t) p->dev_num % table_size;
+ return (uintmax_t) {p->dev_num} % table_size;
}
static bool
if (ss->half_alloc * sizeof *ss->argv <= string_bytes)
splitbuf_grow (ss);
((char *) (ss->argv + ss->half_alloc))[string_bytes] = c;
- ss->argv[ss->argc] = (char *) (intptr_t) (string_bytes + 1);
+ ss->argv[ss->argc] = (char *) (intptr_t) {string_bytes + 1};
}
/* If SS's most recent character was a separator, finish off its
# if defined ASSERT || defined __GMP_DECLSPEC || defined __GMP_GNUC_PREREQ
# endif
+/* longlong.h uses casts even when useless. */
+# if 14 <= __GNUC__
+# pragma GCC diagnostic ignored "-Wuseless-cast"
+# endif
+
# if _ARCH_PPC
# define HAVE_HOST_CPU_FAMILY_powerpc 1
# endif
(char const *) NULL);
#define print_int(TYPE) \
- sprintf (limit + 1, "%ju", (uintmax_t) TYPE##_MAX); \
+ sprintf (limit + 1, "%ju", (uintmax_t) {TYPE##_MAX}); \
printf (#TYPE"_MAX=%s\n", limit + 1); \
printf (#TYPE"_OFLOW=%s\n", decimal_absval_add_one (limit)); \
if (TYPE##_MIN) \
{ \
- sprintf (limit + 1, "%jd", (intmax_t) TYPE##_MIN); \
+ sprintf (limit + 1, "%jd", (intmax_t) {TYPE##_MIN}); \
printf (#TYPE"_MIN=%s\n", limit + 1); \
printf (#TYPE"_UFLOW=%s\n", decimal_absval_add_one (limit)); \
}
print_float (LDBL);
/* Other useful constants */
- printf ("SIGRTMIN=%jd\n", (intmax_t) SIGRTMIN);
- printf ("SIGRTMAX=%jd\n", (intmax_t) SIGRTMAX);
- printf ("IO_BUFSIZE=%ju\n", (uintmax_t) IO_BUFSIZE);
+ printf ("SIGRTMIN=%jd\n", (intmax_t) {SIGRTMIN});
+ printf ("SIGRTMAX=%jd\n", (intmax_t) {SIGRTMAX});
+ printf ("IO_BUFSIZE=%ju\n", (uintmax_t) {IO_BUFSIZE});
/* Errnos */
errno_iterate (print_errno, NULL);
dev_ino_hash (void const *x, size_t table_size)
{
struct dev_ino const *p = x;
- return (uintmax_t) p->st_ino % table_size;
+ return (uintmax_t) {p->st_ino} % table_size;
}
static bool
/* Similar to 'powl(3)' but without requiring 'libm'. */
static long double
-powerld (long double base, int x)
+powerld (long double base, ptrdiff_t x)
{
long double result = base;
if (x == 0)
return SSE_INVALID_NUMBER;
/* number of digits in the fractions. */
- size_t exponent = ptr2 - *endptr;
+ ptrdiff_t exponent = ptr2 - *endptr;
- val_frac = ((long double) val_frac) / powerld (10, exponent);
+ val_frac /= powerld (10, exponent);
/* TODO: detect loss of precision (only really 18 digits
of precision across all digits (before and after '.')). */
int fail_status)
{
ptrdiff_t res = argmatch (style, timestyle_args,
- (char const *) timestyle_types,
+ timestyle_types,
timestyle_types_size);
if (res < 0)
{
if (ftruncate (fd, nsize) != 0)
{
error (0, errno, _("failed to truncate %s at %jd bytes"),
- quoteaf (fname), (intmax_t) nsize);
+ quoteaf (fname), (intmax_t) {nsize});
return false;
}