From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 9EE7C3858D39; Mon, 20 Feb 2023 21:36:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9EE7C3858D39 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: bfd-cvs@sourceware.org Subject: [binutils-gdb] Hoist the SECTION comment in opncls.c X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 2070491c1c31b254b1e8f2250144777a23e9f616 X-Git-Newrev: 03a7c6eb51811e7c0b0fa21fbdf2b3434986ba64 Message-Id: <20230220213601.9EE7C3858D39@sourceware.org> Date: Mon, 20 Feb 2023 21:36:01 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2023 21:36:01 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D03a7c6eb5181= 1e7c0b0fa21fbdf2b3434986ba64 commit 03a7c6eb51811e7c0b0fa21fbdf2b3434986ba64 Author: Tom Tromey Date: Fri Feb 17 12:12:11 2023 -0700 Hoist the SECTION comment in opncls.c =20 The opening and closing node in BFD starts: =20 File: bfd.info, [...] =20 /* Set to N to open the next N BFDs using an alternate id spac= e. */ extern unsigned int bfd_use_reserved_id; =20 2.13 Opening and closing BFDs =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D =20 That is, there's a stray C comment and declaration before any other text or subsections. =20 This occurs because the code fragment for bfd_use_reserved_id comes before the SECTION comment. Hoisting it makes this a little nicer. =20 2023-02-17 Tom Tromey =20 * opncls.c: Hoist the SECTION comment. Diff: --- bfd/ChangeLog | 4 ++++ bfd/opncls.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a974a5c6716..fac38b8e4fa 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2023-02-17 Tom Tromey + + * opncls.c: Hoist the SECTION comment. + 2023-02-17 Tom Tromey =20 * opncls.c (bfd_get_debug_link_info_1, separate_debug_file_exists) diff --git a/bfd/opncls.c b/bfd/opncls.c index 3fa2b03fdf9..4d0ca48ee78 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -37,6 +37,14 @@ #define S_IXOTH 0001 /* Execute by others. */ #endif =20 +/* +SECTION + Opening and closing BFDs + +SUBSECTION + Functions for opening and closing +*/ + /* Counters used to initialize the bfd identifier. */ =20 static unsigned int bfd_id_counter =3D 0; @@ -185,14 +193,6 @@ _bfd_free_cached_info (bfd *abfd) return true; } =20 -/* -SECTION - Opening and closing BFDs - -SUBSECTION - Functions for opening and closing -*/ - /* FUNCTION bfd_fopen