From patchwork Wed Mar 26 07:16:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Riesch X-Patchwork-Id: 333793 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D7C8A140083 for ; Wed, 26 Mar 2014 18:16:54 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753002AbaCZHQu (ORCPT ); Wed, 26 Mar 2014 03:16:50 -0400 Received: from ns.omicron.at ([212.183.10.25]:57014 "EHLO ns.omicron.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752035AbaCZHQt (ORCPT ); Wed, 26 Mar 2014 03:16:49 -0400 Received: from counter.omicron.at ([212.183.10.29]) by ns.omicron.at (8.13.1/8.13.1) with ESMTP id s2Q7GeHN012098; Wed, 26 Mar 2014 08:16:45 +0100 Received: from mary.at.omicron.at (mary.at.omicron.at [172.22.100.48]) by counter.omicron.at (8.14.4/8.14.4) with ESMTP id s2Q7GZMY015636; Wed, 26 Mar 2014 08:16:40 +0100 Received: from ChrRie22.omicron.at (172.22.2.106) by mary-special.at.omicron.at (172.22.100.48) with Microsoft SMTP Server id 8.3.327.1; Wed, 26 Mar 2014 08:16:32 +0100 From: Christian Riesch To: CC: Richard Cochran , Christian Riesch , Dong Zhu Subject: [PATCH v2 net-next 2/2] ptp: Fix compiler warnings in the testptp utility Date: Wed, 26 Mar 2014 08:16:03 +0100 X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1395818163-31672-1-git-send-email-christian.riesch@omicron.at> References: <1395818163-31672-1-git-send-email-christian.riesch@omicron.at> MIME-Version: 1.0 Message-ID: <35ec3d13-e8a8-4cf4-b5ce-91c4dbe2ac0b@mary.at.omicron.at> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Christian Riesch Cc: Dong Zhu Acked-by: Richard Cochran --- Changes for v2: - Use PRI64d macro for __s64 in printf Documentation/ptp/testptp.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/ptp/testptp.c b/Documentation/ptp/testptp.c index 13bddd5..f1ac2da 100644 --- a/Documentation/ptp/testptp.c +++ b/Documentation/ptp/testptp.c @@ -19,6 +19,7 @@ */ #include #include +#include #include #include #include @@ -496,14 +497,14 @@ int main(int argc, char *argv[]) interval = t2 - t1; offset = (t2 + t1) / 2 - tp; - printf("system time: %ld.%ld\n", + printf("system time: %" PRId64 ".%u\n", (pct+2*i)->sec, (pct+2*i)->nsec); - printf("phc time: %ld.%ld\n", + printf("phc time: %" PRId64 ".%u\n", (pct+2*i+1)->sec, (pct+2*i+1)->nsec); - printf("system time: %ld.%ld\n", + printf("system time: %" PRId64 ".%u\n", (pct+2*i+2)->sec, (pct+2*i+2)->nsec); - printf("system/phc clock time offset is %ld ns\n" - "system clock time delay is %ld ns\n", + printf("system/phc clock time offset is %" PRId64 " ns\n" + "system clock time delay is %" PRId64 " ns\n", offset, interval); }