[Mesa-dev] [PATCH] hud: fix compilation warnings in hud_nic_graph_install()

Nicolai Hähnle nhaehnle at gmail.com
Mon Jan 30 10:04:53 UTC 2017


On 27.01.2017 14:35, Samuel Pitoiset wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/gallium/auxiliary/hud/hud_nic.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/auxiliary/hud/hud_nic.c b/src/gallium/auxiliary/hud/hud_nic.c
> index f9935dea8b..7e4feb9573 100644
> --- a/src/gallium/auxiliary/hud/hud_nic.c
> +++ b/src/gallium/auxiliary/hud/hud_nic.c
> @@ -263,11 +263,11 @@ hud_nic_graph_install(struct hud_pane *pane, const char *nic_name,
>
>     nic->mode = mode;
>     if (nic->mode == NIC_DIRECTION_RX) {
> -      snprintf(gr->name, sizeof(gr->name), "%s-rx-%lldMbps", nic->name,
> +      snprintf(gr->name, sizeof(gr->name), "%s-rx-%"PRIx64"Mbps", nic->name,

I think you want PRId64 - PRIx64 gives you hexadecimal.

Cheers,
Nicolai

>           nic->speedMbps);
>     }
>     else if (nic->mode == NIC_DIRECTION_TX) {
> -      snprintf(gr->name, sizeof(gr->name), "%s-tx-%lldMbps", nic->name,
> +      snprintf(gr->name, sizeof(gr->name), "%s-tx-%"PRIx64"Mbps", nic->name,
>           nic->speedMbps);
>     }
>     else if (nic->mode == NIC_RSSI_DBM)
>



More information about the mesa-dev mailing list