X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679831923; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=luMT+xRJb48190+jimy150V4KtKXqSWVc10vbUycTd0=; b=Bn1/uMRG4jsnXR6uxrRi5dfieyrJlAvpEaWZFaHYQvfOTuRLjdRbLLllIVXAkxUtkY HVH1dsrIhJQ+Rf/wJwvAbNg+xTTeN3XtSP0nwkrr9zclTvqk7P0hw5dQw4TLbm4OnXfH Tb3pV/t/Gy1qfNKIynSeOcz+e2mmorHT4sS1CQjArZr7f4hYUdG/JD//RNbNX6EaLAI6 3VRVXr2hQMGU7qxpdiD0kSGgFGjljFFg+KANpCizVYx/Lp8aK9MyDU7R66H+AKfaeSop 6vwSmPLw+dBotWYmiVUlRxWnn7ND6EMSdzYq8JZOMz0NoIE10aKqtGW9HjHHcC/C+6ad e9sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679831923; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=luMT+xRJb48190+jimy150V4KtKXqSWVc10vbUycTd0=; b=UDOH1JduWZpvYUIl4rHyPSPrIUe5GP51FGtweCssLN6Ve8FoJFuCkt7TP0C2H4IRJZ cxfIUgWkGrJlOSKae4jetc1koVPVf7wmTp+jt+C9E6e7+05IO8AJVIofTzkzqvJp4uP1 202KAaXLC/8BMBH8PnZ9UZUUdcUWQ0gwTrzI+fr+tE4KXLqKpU0n53yRq5zdqzGO4IFt dk6uhZr1gHp86S2E4QM5mTCH29K4u27+qd9cBgXx49AlMtf3Kt7pZNmx6zYesSv+sWMm tt8zkFWxf4UfJhFscz80Cr1qzgtRxy4uVR2zb14ORJbL6kb3ab4KdiYa/gQ0/71Q/8/E ZWeg== X-Gm-Message-State: AAQBX9eaPoi7IL+2cHB18uTeFnGEAOahWKjKXOLaTu9Yppib1ttZtAVD HlL+o0nfCoL+QmLghS0UZu4KnxJ1nVE5xFWaVSfHNhSY X-Google-Smtp-Source: AKy350Yoep9LnnBLkmFeRDaZ+JB/vfDt/F8pTtqn4JSiUYjIthEdw03aiLvLBuTVU+TvFQAY5e+PM1H5AFXDZlK1hAs= X-Received: by 2002:a5d:69c5:0:b0:2cf:e740:8293 with SMTP id s5-20020a5d69c5000000b002cfe7408293mr1701103wrw.9.1679831923396; Sun, 26 Mar 2023 04:58:43 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20230326011007.03df3795@gmx.de> References: <20230326011007 DOT 03df3795 AT gmx DOT de> From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" Date: Sun, 26 Mar 2023 14:58:42 +0300 Message-ID: Subject: Re: Signess issues in dxe3gen.c inhibits the compilation of the repository code. To: djgpp AT delorie DOT com Content-Type: text/plain; charset="UTF-8" Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > In /cvs/djgpp/djgpp/src/dxe/dxe3gen.c 2023/01/31 20:15:02 1.28 > the variables max_names and num_names are declared as unsigned int. > Later at line 1323 in dxe3gen.c, num_names gets compared with n_exp_syms > that is declared as LONG32 in dxe.h inhibiting the compilation of the > current repository code. max_names and num_names are members of the > struct opt defined in dxe3gen.c and n_exp_syms is a member of the > struct dxe3_header defined in dxe.h. > Modifying the signess of opt.num_names generates new signess > issues like this: > gcc -g -DDXE_CC=\"gcc\" -DDXE_AR=\"ar\" dxe3gen.c -o > ../../hostbin/dxegen.exe > gcc ... -c dxe3gen.c > dxe3gen.c: In function `process_exp_file': > dxe3gen.c:513: warning: comparison between signed and unsigned > dxe3gen.c: In function `write_dxe': > dxe3gen.c:1285: warning: comparison between signed and unsigned > dxe3gen.c:1334: warning: comparison between signed and unsigned > make[1]: *** [../makefile.inc:90: dxe3gen.o] Error 1 > make: *** [makefile:48: subs] Error 2 > > Is there any reason for this difference in signess of the members > of those structs if they shall be compared some where in the code? No, not really. You can avoid that warning at line 1323 like: - if (opt.num_names && opt.num_names != dh.n_exp_syms) + if (opt.num_names && opt.num_names != (ULONG32)dh.n_exp_syms)