From: Craig Small Date: Sat, 25 Mar 2017 00:23:43 +0000 (+1100) Subject: pstree: Explictly cast ino_t to long int X-Git-Tag: v23.0~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42645b5a7a3bc56444e10afa6c4e08917a8b44ac;p=psmisc pstree: Explictly cast ino_t to long int kFreeBSD compilier complains about this while Linux does not. Gave wformat warning during compile. --- diff --git a/src/pstree.c b/src/pstree.c index 7574bd8..ce51d26 100644 --- a/src/pstree.c +++ b/src/pstree.c @@ -834,7 +834,7 @@ static void dump_by_namespace(struct ns_entry *root) char buff[14]; for ( ; ptr; ptr = ptr->next) { - snprintf(buff, sizeof(buff), "[%li]\n", ptr->number); + snprintf(buff, sizeof(buff), "[%li]\n", (long int)ptr->number); out_string(buff); for (c = ptr->children; c; c = c->next) dump_tree(c->child, 0, 1, 1, 1, 0, 0);