git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e91e12)
Fix compiler warnings
2016年9月29日 16:00:00 +0000 (12:00 -0400)
2016年9月29日 16:00:00 +0000 (12:00 -0400)
This was missed in bf5bb2e85b6492c7245b9446efaf43d52a98db13, because the
code is only visible under PG_FLUSH_DATA_WORKS.


diff --git a/src/common/file_utils.c b/src/common/file_utils.c
index 04cd365e765e7a6300033a69145579793143403b..1d855645b91cb712a856de7eda361ca550956b60 100644 (file)
--- a/src/common/file_utils.c
+++ b/src/common/file_utils.c
@@ -30,7 +30,7 @@
#endif
#ifdef PG_FLUSH_DATA_WORKS
-static void pre_sync_fname(const char *fname, bool isdir,
+static int pre_sync_fname(const char *fname, bool isdir,
const char *progname);
#endif
static void walkdir(const char *path,
@@ -187,7 +187,7 @@ walkdir(const char *path,
*/
#ifdef PG_FLUSH_DATA_WORKS
-static void
+static int
pre_sync_fname(const char *fname, bool isdir, const char *progname)
{
int fd;
@@ -197,10 +197,10 @@ pre_sync_fname(const char *fname, bool isdir, const char *progname)
if (fd < 0)
{
if (errno == EACCES || (isdir && errno == EISDIR))
- return;
+ return 0;
fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
progname, fname, strerror(errno));
- return;
+ return -1;
}
/*
@@ -217,6 +217,7 @@ pre_sync_fname(const char *fname, bool isdir, const char *progname)
#endif
(void) close(fd);
+ return 0;
}
#endif /* PG_FLUSH_DATA_WORKS */
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /