From owner-svn-src-all@FreeBSD.ORG Thu Mar 22 09:50:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7DB0106564A; Thu, 22 Mar 2012 09:50:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1C8C8FC17; Thu, 22 Mar 2012 09:50:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2M9oGiG017717; Thu, 22 Mar 2012 09:50:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2M9oGRL017715; Thu, 22 Mar 2012 09:50:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203220950.q2M9oGRL017715@svn.freebsd.org> From: Dimitry Andric Date: Thu, 22 Mar 2012 09:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233299 - stable/9/usr.sbin/dconschat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2012 09:50:17 -0000 Author: dim Date: Thu Mar 22 09:50:16 2012 New Revision: 233299 URL: http://svn.freebsd.org/changeset/base/233299 Log: MFC r233195: Fix the following warning from clang trunk: usr.sbin/dconschat/dconschat.c:163:65: error: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat] snprintf(buf, PAGE_SIZE, "\r\n[dconschat reset target(addr=0x%zx)...]\r\n", dc->reset); ~~^ ~~~~~~~~~ %llx Silence this by casting dc->reset to intmax_t, and using the appropriate length modifier. While here, wrap the line to a 80 character margin. Modified: stable/9/usr.sbin/dconschat/dconschat.c Modified: stable/9/usr.sbin/dconschat/dconschat.c ============================================================================== --- stable/9/usr.sbin/dconschat/dconschat.c Thu Mar 22 09:47:14 2012 (r233298) +++ stable/9/usr.sbin/dconschat/dconschat.c Thu Mar 22 09:50:16 2012 (r233299) @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -160,7 +161,9 @@ dconschat_reset_target(struct dcons_stat if (dc->reset == 0) return; - snprintf(buf, PAGE_SIZE, "\r\n[dconschat reset target(addr=0x%zx)...]\r\n", dc->reset); + snprintf(buf, PAGE_SIZE, + "\r\n[dconschat reset target(addr=0x%jx)...]\r\n", + (intmax_t)dc->reset); write(p->outfd, buf, strlen(buf)); bzero(&buf[0], PAGE_SIZE); dwrite(dc, (void *)buf, PAGE_SIZE, dc->reset);