Skip site navigation (1) Skip section navigation (2)

add __attribute__((noreturn)) to suppress a waring

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: add __attribute__((noreturn)) to suppress a waring
Date: 2011-01-24 01:42:35
Message-ID: AANLkTikvi3m7RKOtHP0ctSdspSfmc-75fmWv79GYLM57@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
I found the following warning with Fedora 14 / gcc 4.5.1.
----
pg_backup_archiver.c: In function ‘_discoverArchiveFormat’:
pg_backup_archiver.c:1736:11: warning: ‘fh’ may be used uninitialized
in this function
----
To suppress it, I'm thinking to add noreturn to die_horribly().
Any objections?  Another solution might be adding a dummy assignment
after calls of die_horribly().

-- 
Itagaki Takahiro

Attachment: noreturn.diff
Description: application/octet-stream (1.6 KB)

Responses

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2011-01-24 01:48:04
Subject: SSI, simplified
Previous:From: Kevin GrittnerDate: 2011-01-24 01:16:00
Subject: Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group