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

[PATCH] Compile without warning with gcc's -Wtype-limits, -Wempty-body

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [PATCH] Compile without warning with gcc's -Wtype-limits, -Wempty-body
Date: 2013-01-14 23:29:07
Message-ID: 20130114232907.GD22155@awork2.anarazel.de (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi,

the attached trivial patch allows to compile with -Wtype-limits
-Wempty-body (or -Wextra -Wno-unused-parameter -Wno-sign-compare
-Wno-missing-field-initializers).

As the two fixes seem harmless, that seems to be a good idea. And the
recent "bug" (its not really that, but ...) in walsender.c shows that at
least -Wtype-limits is a sensible warning.

Independently from this patch, should we add -Wtype-limits to the
default parameters?

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment: no-warnings-with-W-type-limits.patch
Description: text/x-patch (1.1 KB)

Responses

pgsql-hackers by date

Next:From: Merlin MoncureDate: 2013-01-15 00:36:00
Subject: Re: json api WIP patch
Previous:From: joeDate: 2013-01-14 23:13:14
Subject: BUG #7809: Running pg_dump on slave w/ streaming replication fails ifthere are unlogged tables

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