[PATCH] Compile without warning with gcc's -Wtype-limits, -Wempty-body
Andres Freund <andres@2ndquadrant.com>
From: Andres Freund <andres@2ndquadrant.com>
To: pgsql-hackers@postgresql.org
Date: 2013-01-14T23:29:07Z
Lists: pgsql-hackers
Attachments
- no-warnings-with-W-type-limits.patch (text/x-patch) patch
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
Commits
-
Return value of lseek() can be negative on failure.
- 3f4b1749a816 9.3.0 cited