Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1covsB-0004Ex-LY for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Mar 2017 17:41:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1covsA-00078R-Sc for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Mar 2017 17:41:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1covqf-0004R5-Fa for pgsql-hackers@postgresql.org; Fri, 17 Mar 2017 17:39:33 +0000 Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1covqc-0001PX-Oq for pgsql-hackers@postgresql.org; Fri, 17 Mar 2017 17:39:32 +0000 Received: by mail-qk0-x233.google.com with SMTP id 1so70281232qkl.3 for ; Fri, 17 Mar 2017 10:39:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=wEpmnVdQCZaJonkgnNolkKlO64MJu2wQ2OxNmKWqwwg=; b=mu8tvjGEpPs6iVRe3BlQpZNM8mjM3s8tPAqoqQDVTU/iM46T2Aqirybk61A2RgJo2u GqNVHp4VRqJ3lEX8TKMG+wS2a+wZjnDVuj1zVqix3B67wqq5G4pQvPzHAEsuFPIf/xAl Zh8gpw2hHBhzFYOK6Dy8dDDXIWINCo2baGJU6k5skmsF3ep7J/tP9CC1sA4ikD0/0EMf +pW2SGSyV0DC/B1DwtF0GpCiP5rrZvlGYaHU8+9DT2AdI33TuS792LE2g29+rS9r28sy h0P0IrUsU8b9a0rXSjw/fBNLDaI+GZX1lBJ//bkcjSj4g+U3Q3KAt5tqwUzxWaIaMXsk yOWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=wEpmnVdQCZaJonkgnNolkKlO64MJu2wQ2OxNmKWqwwg=; b=onZe0CpPjFZuIdKJeQON/vgqbT/XgPfY2i67DUP1H/V51dNgJRdPA8+dIGXJAGtbpS c3FFN3XancfoG4Duf0WTHJBbSnE56UXLHm4IM+w2EL+S3ySFf1QC8wAquq3jpWqLoJXO V9CcwLUHdu7LPtPPIfF1WJ0GZLScSps3Yhk+UxBpu7l8i4eERCv7EI8IYusWtqMe2iO6 ZSqLxrTSQboKQpxXighr64qQoH+ORISiG6O8OMQSztCALnTzgaw5BG/9x+hTQ8lbCu1H gduSHA3hnmASWtSbDEoU0riFXjT136+247T4Tq8PcQgexxG3yfSl2tFjACLBW0rz+edm 1zvA== X-Gm-Message-State: AFeK/H1LeLrsuW4Y7qk0htTBBIg+vpM7Xsu0nVH3HiDK4hV41mu7xtdRnSbUu47ZVJog33ww X-Received: by 10.55.20.67 with SMTP id e64mr13359113qkh.148.1489772369284; Fri, 17 Mar 2017 10:39:29 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([179.57.115.10]) by smtp.gmail.com with ESMTPSA id d23sm6365476qta.32.2017.03.17.10.39.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2017 10:39:28 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 786D9F75; Fri, 17 Mar 2017 14:39:26 -0300 (CLST) Date: Fri, 17 Mar 2017 14:39:26 -0300 From: Alvaro Herrera To: Peter Eisentraut Cc: Michael Paquier , PostgreSQL mailing lists Subject: Re: [COMMITTERS] pgsql: Remove objname/objargs split for referring to objects Message-ID: <20170317173926.7uhydgrmg3qh6xup@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nbhqzz7hcubesytf" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170206-195-7adf12 (1.7.2) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --nbhqzz7hcubesytf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Peter Eisentraut wrote: > cc -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute > -Wformat-security -fno-strict-aliasing -fwrapv > -fexcess-precision=standard -g -O2 -I../../../src/include > -D_FORTIFY_SOURCE=2 -DLINUX_OOM_ADJ -D_GNU_SOURCE -I/usr/include/libxml2 > -c -o objectaddress.o objectaddress.c > objectaddress.c: In function ‘get_object_address’: > objectaddress.c:1650:24: warning: ‘typeoids[1]’ may be used > uninitialized in this function [-Wmaybe-uninitialized] > objectaddress.c:1582:6: note: ‘typeoids[1]’ was declared here > objectaddress.c:1627:43: warning: ‘typenames[1]’ may be used > uninitialized in this function [-Wmaybe-uninitialized] > objectaddress.c:1581:12: note: ‘typenames[1]’ was declared here > objectaddress.c:1650:24: warning: ‘typeoids[0]’ may be used > uninitialized in this function [-Wmaybe-uninitialized] > objectaddress.c:1582:6: note: ‘typeoids[0]’ was declared here > objectaddress.c:1627:43: warning: ‘typenames[0]’ may be used > uninitialized in this function [-Wmaybe-uninitialized] > objectaddress.c:1581:12: note: ‘typenames[0]’ was declared here > > cc (Debian 4.7.2-5) 4.7.2 Oh yeah, buildfarm member sitella shows that. Does the attached patch fix it? (pretty much the same thing Michael attached, but we also need to handle typeoids) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --nbhqzz7hcubesytf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="objaddr-warn.patch" diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c index 8ccc171..7f73fc0 100644 --- a/src/backend/catalog/objectaddress.c +++ b/src/backend/catalog/objectaddress.c @@ -1578,8 +1578,8 @@ get_object_address_opf_member(ObjectType objtype, ObjectAddress address; ListCell *cell; List *copy; - TypeName *typenames[2]; - Oid typeoids[2]; + TypeName *typenames[2] = { NULL, NULL }; + Oid typeoids[2] = { InvalidOid, InvalidOid }; int membernum; int i; @@ -1607,6 +1607,9 @@ get_object_address_opf_member(ObjectType objtype, break; } + Assert(typenames[0] != NULL && typenames[1] != NULL); + Assert(typeoids[0] != InvalidOid && typeoids[1] != InvalidOid); + switch (objtype) { case OBJECT_AMOP: --nbhqzz7hcubesytf Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers --nbhqzz7hcubesytf--