From patchwork Fri Jun 13 21:34:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Buchbinder X-Patchwork-Id: 4351781 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0C4629F333 for ; Fri, 13 Jun 2014 21:34:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3398B2028D for ; Fri, 13 Jun 2014 21:34:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CDDB2026D for ; Fri, 13 Jun 2014 21:34:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753230AbaFMVeo (ORCPT ); Fri, 13 Jun 2014 17:34:44 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:36699 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751811AbaFMVen (ORCPT ); Fri, 13 Jun 2014 17:34:43 -0400 Received: by mail-pd0-f177.google.com with SMTP id y10so1023724pdj.8 for ; Fri, 13 Jun 2014 14:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=81xi7SVQ77UiykQbcb6Sh0zrdNI0oeZxTaRMSLSrits=; b=Ns58ZX2NvcKIPZcRszVVd0E88zRBW2T6YWxeATxh4RIdX4vt1Cdrl8B/9hTP+CFQQC /4v/6UebgsBpJPW0A7HvWYfXpYtTefSDw1kp9yK7WXKIKQWGYilDlgqmA5j6SshY7FXh 2yq7h88H+7YBv1OaenQpSFIymzoYR+Qb2N3VHJ5bV7dcgYoLRl12QmkwBX1ZQSXzPb5/ 4c7sF/lRbHNKDZvS/1/YKyrMMUEwsbvtGuVIPhomfMd4QcWXW5nTZ3RSWic9YkZts5Fv En0EE9Ve3rt+V41VRMcsgWqVmPBcRkgtp5F5CKwB3c5qq/EnBK0qOtbNBj7FQ0Q6oxa4 5rhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=81xi7SVQ77UiykQbcb6Sh0zrdNI0oeZxTaRMSLSrits=; b=HIj5OJSe0d8nuswTjTtPvJya/zXxlKH8knzGOPP3PghSwJvMf0L1p3XdrHvLV2FPCA e4LnwVV1Tq/9f/vHdLb4feEzW1t5ZbnC0ninAHoxsOaHUp5II+Zg+XEth+ZeQOdA/5TY yuOuv6WaaBxdhCruXtfLRZYNOJA/Cy1OcPmHX0R06GZ11ZwXmXoQbaVTi7yy2+F0HHLj rVsn+sJDdrahPzvpRrT02awxzpPE+p3b3sWBP2CZ9INkeknGNeBIR/C4Zc+d/lKcbjre FSi9lzhMdZCeAfyAA5/TiAwggcL/M5jvQNoe0v8r1evuSVoCB4n+1UKkt22X9zbkN712 mRcg== X-Gm-Message-State: ALoCoQnNIIQp/IvGgF0s/bOzwrJeSJY61MAxOoWDFB6xD6IPhCYeYuIrFUr5r+s6xNIjiBsrA3FU7zENtRzpQWSoCzbPUO//HoQR5OfHctEDCRFAhVazRPORMGXyqCB8TCnLIndycRPd5NNSDkf404TsiNZciWa+Dw== X-Received: by 10.66.235.34 with SMTP id uj2mr6553111pac.28.1402695282902; Fri, 13 Jun 2014 14:34:42 -0700 (PDT) Received: from abuchbinder-glaptop.corp.google.com (dhcp-172-19-65-142.mtv.corp.google.com [172.19.65.142]) by mx.google.com with ESMTPSA id qv9sm5304127pbc.71.2014.06.13.14.34.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Jun 2014 14:34:42 -0700 (PDT) From: Adam Buchbinder To: linux-btrfs@vger.kernel.org Cc: dave@jikos.cz, Adam Buchbinder Subject: [PATCH 1/2] Remove extra 'const' modifiers; they don't do anything. Date: Fri, 13 Jun 2014 14:34:35 -0700 Message-Id: <1402695276-28104-1-git-send-email-abuchbinder@google.com> X-Mailer: git-send-email 2.0.0.526.g5318336 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 'const int const *x' means the same thing as 'const int *x' or 'int const *x'; the intent was probably 'const int * const x'. However, this won't work for the 'suffix' variable, as it has to be assigned, and making the static tables into const pointers to const chars leads to a mismatch there. This was found with clang's duplicate-decl-specifier warning. Signed-off-by: Adam Buchbinder --- utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils.c b/utils.c index d29de94..91a7111 100644 --- a/utils.c +++ b/utils.c @@ -1295,9 +1295,9 @@ out: return ret; } -static const char const *unit_suffix_binary[] = +static const char* unit_suffix_binary[] = { "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"}; -static const char const *unit_suffix_decimal[] = +static const char* unit_suffix_decimal[] = { "B", "KB", "MB", "GB", "TB", "PB", "EB"}; int pretty_size_snprintf(u64 size, char *str, size_t str_size, int unit_mode) @@ -1305,7 +1305,7 @@ int pretty_size_snprintf(u64 size, char *str, size_t str_size, int unit_mode) int num_divs; float fraction; int base = 0; - const char const **suffix = NULL; + const char** suffix = NULL; u64 last_size; if (str_size == 0)