From patchwork Sun Jan 27 20:57:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Al-Gaaf X-Patchwork-Id: 2052611 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0E017DFE86 for ; Sun, 27 Jan 2013 20:57:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756128Ab3A0U5g (ORCPT ); Sun, 27 Jan 2013 15:57:36 -0500 Received: from wp188.webpack.hosteurope.de ([80.237.132.195]:60518 "EHLO wp188.webpack.hosteurope.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756118Ab3A0U5f (ORCPT ); Sun, 27 Jan 2013 15:57:35 -0500 Received: from nrbg-4dbe227d.pool.mediaways.net ([77.190.34.125] helo=darkangel.fritz.box); authenticated by wp188.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1TzZID-0000ln-4a; Sun, 27 Jan 2013 21:57:33 +0100 From: Danny Al-Gaaf To: ceph-devel@vger.kernel.org Cc: Danny Al-Gaaf , Sage Weil Subject: [PATCH 1/2] utime: fix narrowing conversion compiler warning in sleep() Date: Sun, 27 Jan 2013 21:57:31 +0100 Message-Id: <1359320252-2445-2-git-send-email-danny.al-gaaf@bisect.de> X-Mailer: git-send-email 1.8.1.1 In-Reply-To: <1359320252-2445-1-git-send-email-danny.al-gaaf@bisect.de> References: <1359320252-2445-1-git-send-email-danny.al-gaaf@bisect.de> X-bounce-key: webpack.hosteurope.de; danny.al-gaaf@bisect.de; 1359320255; f1feab53; Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Fix compiler warning: ./include/utime.h: In member function 'void utime_t::sleep()': ./include/utime.h:139:50: warning: narrowing conversion of '((utime_t*)this)->utime_t::tv.utime_t::::tv_sec' from '__u32 {aka unsigned int}' to '__time_t {aka long int}' inside { } is ill-formed in C++11 [-Wnarrowing] ./include/utime.h:139:50: warning: narrowing conversion of '((utime_t*)this)->utime_t::tv.utime_t::::tv_nsec' from '__u32 {aka unsigned int}' to 'long int' inside { } is ill-formed in C++11 [-Wnarrowing] Signed-off-by: Danny Al-Gaaf --- src/include/utime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/utime.h b/src/include/utime.h index 526dec5..f433fff 100644 --- a/src/include/utime.h +++ b/src/include/utime.h @@ -136,7 +136,7 @@ public: } void sleep() { - struct timespec ts = { tv.tv_sec, tv.tv_nsec }; + struct timespec ts = { (__time_t)tv.tv_sec, (long)tv.tv_nsec }; nanosleep(&ts, &ts); }