Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753521AbbFDT1c (ORCPT ); Thu, 4 Jun 2015 15:27:32 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:34790 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751838AbbFDT12 (ORCPT ); Thu, 4 Jun 2015 15:27:28 -0400 From: Frans Klaver To: Jonathan Corbet Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Cochran , Frans Klaver Subject: [PATCH v2] Doc: networking: txtimestamp: fix printf format warning Date: Thu, 4 Jun 2015 21:27:38 +0200 Message-Id: <1433446058-18332-1-git-send-email-fransklaver@gmail.com> X-Mailer: git-send-email 2.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1827 Lines: 51 Documentation/networking/timestamping/txtimestamp.c: In function ‘__print_timestamp’: Documentation/networking/timestamping/txtimestamp.c:99:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int64_t’ [-Wformat=] fprintf(stderr, " (%+ld us)", cur_ms - prev_ms); int64_t differs per platform, so a type specifier that differs along with it is required. Signed-off-by: Frans Klaver --- v1..v2: switch from cast to inttypes.h defined PRId64 Documentation/networking/timestamping/txtimestamp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/networking/timestamping/txtimestamp.c b/Documentation/networking/timestamping/txtimestamp.c index 8217510..5df0704 100644 --- a/Documentation/networking/timestamping/txtimestamp.c +++ b/Documentation/networking/timestamping/txtimestamp.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -49,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -96,7 +96,7 @@ static void __print_timestamp(const char *name, struct timespec *cur, prev_ms = (long) ts_prev.tv_sec * 1000 * 1000; prev_ms += ts_prev.tv_nsec / 1000; - fprintf(stderr, " (%+ld us)", cur_ms - prev_ms); + fprintf(stderr, " (%+" PRId64 " us)", cur_ms - prev_ms); } ts_prev = *cur; -- 2.4.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/