Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJ0kq-0005Vr-A8 for pgsql-committers@arkaria.postgresql.org; Mon, 30 Mar 2020 20:11:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJ0kp-0006Y3-2i for pgsql-committers@arkaria.postgresql.org; Mon, 30 Mar 2020 20:11:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJ0ko-0006Xp-PS for pgsql-committers@lists.postgresql.org; Mon, 30 Mar 2020 20:11:26 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJ0kl-0000fb-AR for pgsql-committers@lists.postgresql.org; Mon, 30 Mar 2020 20:11:25 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 2CB9C21C5707 for ; Mon, 30 Mar 2020 23:11:20 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (not verified)) by mail.postgrespro.ru (Postfix) with ESMTPSA id 9084321C5703 for ; Mon, 30 Mar 2020 23:11:19 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1585599080; bh=h3atBDludeF2jbXJFRMsWcE5CLiYlianN8WFM48oPgU=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=ib0tHQdw5dtl5Y3WjqhgFPCZk8MDo+o61lNRVuoIFaS4T4rsFbZoHZ5S3PwNZqjpl EGywCFnSsw0IL7JJUTOTODA6DIS3fCYstsGgaAzwuujTSih4sZIGExXV1VhzYkVsM8 tXaNMw67Y/rBlyHMUYEmAOk/z/wSjpl6vt1ePuHk= Received: by mail-il1-f174.google.com with SMTP id t6so13563440ilj.8 for ; Mon, 30 Mar 2020 13:11:19 -0700 (PDT) X-Gm-Message-State: ANhLgQ3heOmiiN+d+rQVEMX2lEZth2pTl+CVcKH/4wgor8fJ0rzv4Abx jNi66KHxilV13IfvfDTBkjQ7TbGAKA5Ovthv5I0= X-Google-Smtp-Source: ADFU+vtupSlFafBa1nnG7IySiEp86fR8G8dBPl098gfaWYDTv5+Tse3Oe2mLbPjQ7cQtm5QfjDYThlvj3xXViejmNmA= X-Received: by 2002:a92:da81:: with SMTP id u1mr12693962iln.116.1585599077807; Mon, 30 Mar 2020 13:11:17 -0700 (PDT) MIME-Version: 1.0 References: <20200330183614.qrfi7zipcqiztpti@alap3.anarazel.de> In-Reply-To: <20200330183614.qrfi7zipcqiztpti@alap3.anarazel.de> From: Alexander Korotkov Date: Mon, 30 Mar 2020 23:11:06 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: pgsql: Implement operator class parameters To: Andres Freund Cc: Alexander Korotkov , pgsql-committers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Mar 30, 2020 at 9:36 PM Andres Freund wrote: > This triggers a few new (harmless) warnings for me: > In file included from /home/andres/src/postgresql/src/include/postgres.h:= 46, > from /home/andres/src/postgresql/src/backend/access/inde= x/indexam.c:44: > /home/andres/src/postgresql/src/backend/access/index/indexam.c: In functi= on =E2=80=98index_getprocid=E2=80=99: > /home/andres/src/postgresql/src/backend/access/index/indexam.c:782:17: wa= rning: comparison is always true due to limited range of data type [-Wtype-= limits] > 782 | Assert(procnum >=3D 0 && procnum <=3D (uint16) nproc); > | ^~ > /home/andres/src/postgresql/src/backend/access/index/indexam.c:782:2: not= e: in expansion of macro =E2=80=98Assert=E2=80=99 > 782 | Assert(procnum >=3D 0 && procnum <=3D (uint16) nproc); > | ^~~~~~ > /home/andres/src/postgresql/src/backend/access/index/indexam.c: In functi= on =E2=80=98index_getprocinfo=E2=80=99: > /home/andres/src/postgresql/src/backend/access/index/indexam.c:818:17: wa= rning: comparison is always true due to limited range of data type [-Wtype-= limits] > 818 | Assert(procnum >=3D 0 && procnum <=3D (uint16) nproc); > | ^~ > /home/andres/src/postgresql/src/include/c.h:782:9: note: in definition of= macro =E2=80=98Assert=E2=80=99 > 782 | if (!(condition)) \ > | ^~~~~~~~~ > PostgreSQL installation complete. Thank you! This reveals to me that this commit contains rudiments of allowing procnum =3D=3D 0. I'll commit the fix soon. BTW, what version of compiler (and options) do you use? At the first glance gcc and clang don't show these warnings to me. ------ Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company