From patchwork Thu Apr 6 00:24:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 80000 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp675427vqo; Wed, 5 Apr 2023 17:24:53 -0700 (PDT) X-Google-Smtp-Source: AKy350bWyTGq8ypdLOlYfSUpdDbk1v9h4x0jt4YBXOrvYoegwzRkzqYKB/5hrpeBlDbn0fYHUqpY X-Received: by 2002:a17:906:f146:b0:932:177a:12a5 with SMTP id gw6-20020a170906f14600b00932177a12a5mr4300015ejb.66.1680740692919; Wed, 05 Apr 2023 17:24:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680740692; cv=none; d=google.com; s=arc-20160816; b=TGC8LEXoLlqZLoumB5eW+/jai0cVxdia4xngdcd791YfrXVtxIkj+rnWAx5nNts2yq IHMmNGb/4qCtgPCKnwiyPrO/W7ZRPUiYxDEUGLf0OtE4oSrU3WD+asMq5NlwUTQJVZaC C5fjZ+Ldu9iyS5TXNrUqrO0Xq4pcgADTL7lF7FTRH+jD5nTqQDC2jgIaiLNjZWTfAWHU 6wyCYDXGj5mT4/cAY2WPmZm9s9Ad6yljX4SJ/g3jj2RmEMUh2RNkvul6LJRhBndykHDM 8QzyEoATaiTE4/3tdzjY4zir8Pa1sZAxQwGUDhVtK0MbF+Qctpo+C+MxCTtsaMIJ5a4Y qdag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=J0mO1ZV/zjyTWaiEWVhT+wfgWz5zJjfvmVfIaA3FGvM=; b=c5mWqpOfBHlkroL/02yfpLck1zf6VOOoEl5ruk9Z92ypJP1G6gGrNAVodUbsYG6NZS nBHaY5wGM9dwA9SKCY1R3hlUTY8v4Dte7hmL97e86564e012EzOYiZfV19IG56xbt5Kc CZiShs6Y9jo1b8urmQs5asDSI1XX+7dOlzGk6KMl1lcPt4aM+ViXAS+uwS5U19NuljRg +CpEfgDZj4rftcZ5VuSzUn6G8NYTHJGrxPpeT/S2muyzGk9Z9XqYjVclrHVsBedSCZHz dmcTg/wSy44rq1aiMwk3/s6CvMyOqsIevIIY5NQKM6wQhYiFdJyL+UjbdIHc/lbMFZAg 7RxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=VPMHysbT; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 15-20020a17090602cf00b0093cd9603fcbsi60601ejk.721.2023.04.05.17.24.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 17:24:52 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=VPMHysbT; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 566A43858C1F for ; Thu, 6 Apr 2023 00:24:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 566A43858C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680740689; bh=J0mO1ZV/zjyTWaiEWVhT+wfgWz5zJjfvmVfIaA3FGvM=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=VPMHysbTWNdPor1Qhqyean0czJERChJDwoDtyqEb4ZWciKs32PHenbRO6LNFdEWww zNiBFbCBJnIhBw2kYB1piWa11x6bMGNb3i6qBqfs2+Ag2wi36JAZJNOne65aq+wvjn LaZ91mRjRXNgfN5ZZZnkaArOzqwultGmHmbZ2kko= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id A6839385840F for ; Thu, 6 Apr 2023 00:24:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A6839385840F Received: by mail-pj1-x1030.google.com with SMTP id ml21so13767637pjb.4 for ; Wed, 05 Apr 2023 17:24:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680740680; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=J0mO1ZV/zjyTWaiEWVhT+wfgWz5zJjfvmVfIaA3FGvM=; b=YG8Wfb8LH7PUtEPJZk9k5/5QtwJgoJsKd7g+7o72hQ40OVGdlTyGos/XRG/MMCe57n arVB8aGiMOHMYtUzCobEpz4YVTRTBRp1VgvH/G2fgpSO6SPDdhfAx85xe5UnXhkRRCjg QqjkGUuSXHLKQM3dkP7sYGRVTaLmE6lg0swYiqrcxX96ye7a7yI3j0y99jYqQg5+jUo7 7EWCet9MF3KmATfRVDhnY8H9wsIC98ooyYtIa0b09wbNKsIzRmKbJzz8wOSjFKkkgo0g UsgzLa0yHcjN9N2Ibi2REzm9XsaL+gUnknWqvDLdtxNmAiVFRar2SZ63ivvpHyjeMUwq hddg== X-Gm-Message-State: AAQBX9fOpoUVHyYUisNR/eohiyZACrSGT8jFJXNV4kx1nSD5azDxeuxA J2Ibb4a4GzEACbTLMjDFzpLzMxZr3Qc= X-Received: by 2002:a17:90b:1e0b:b0:23e:fc9c:930 with SMTP id pg11-20020a17090b1e0b00b0023efc9c0930mr8675188pjb.36.1680740680140; Wed, 05 Apr 2023 17:24:40 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:e60c:bee0:cfeb:3a6]) by smtp.gmail.com with ESMTPSA id s4-20020a170902988400b0019cd1ee1523sm121907plp.30.2023.04.05.17.24.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 17:24:39 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 76E8F1142C6B; Thu, 6 Apr 2023 09:54:37 +0930 (ACST) Date: Thu, 6 Apr 2023 09:54:37 +0930 To: binutils@sourceware.org Subject: gas/write.c use better types Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3034.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762384352888244360?= X-GMAIL-MSGID: =?utf-8?q?1762384352888244360?= A tiny tidy. * write.c (frags_chained): Make it a bool. (n_fixups): Make it unsigned. diff --git a/gas/write.c b/gas/write.c index 8273b7a42f1..4ce6f997caa 100644 --- a/gas/write.c +++ b/gas/write.c @@ -124,9 +124,9 @@ void print_fixup (fixS *); chained these all together into a segment, any relocs we add after that must be attached to a segment. This will include relocs added in md_estimate_size_for_relax, for example. */ -static int frags_chained = 0; +static bool frags_chained = false; -static int n_fixups; +static unsigned int n_fixups; #define RELOC_ENUM enum bfd_reloc_code_real @@ -416,7 +416,7 @@ chain_frchains_together (bfd *abfd ATTRIBUTE_UNUSED, /* Now that we've chained the frags together, we must add new fixups to the segment, not to the frag chain. */ - frags_chained = 1; + frags_chained = true; } static void