[dpdk-dev] [PATCH 2/6] eal/linux: remove useless casts

Thomas Monjalon thomas.monjalon at 6wind.com
Thu Jul 9 04:04:18 CEST 2015


David, there is a 32-bit failure. See below

2015-07-07 11:00, David Marchand:
> Rather than cast the huge pages number returned by get_num_hugepages, rework
> this function so that it returns 0 when something goes wrong.
> And no need for casts in log.

> --- a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c
> +					RTE_LOG(INFO, EAL, "%lu hugepages of size %lu reserved, "
> +						"but no mounted hugetlbfs found for that size\n",
> +						num_pages, hpi->hugepage_sz);

error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t {aka long long unsigned int}’



More information about the dev mailing list