Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf2af8dc

Browse files
committed
Fix compiler warnings
This was missed inbf5bb2e, because thecode is only visible under PG_FLUSH_DATA_WORKS.
1 parent8e91e12 commitf2af8dc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎src/common/file_utils.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#endif
3131

3232
#ifdefPG_FLUSH_DATA_WORKS
33-
staticvoidpre_sync_fname(constchar*fname,boolisdir,
33+
staticintpre_sync_fname(constchar*fname,boolisdir,
3434
constchar*progname);
3535
#endif
3636
staticvoidwalkdir(constchar*path,
@@ -187,7 +187,7 @@ walkdir(const char *path,
187187
*/
188188
#ifdefPG_FLUSH_DATA_WORKS
189189

190-
staticvoid
190+
staticint
191191
pre_sync_fname(constchar*fname,boolisdir,constchar*progname)
192192
{
193193
intfd;
@@ -197,10 +197,10 @@ pre_sync_fname(const char *fname, bool isdir, const char *progname)
197197
if (fd<0)
198198
{
199199
if (errno==EACCES|| (isdir&&errno==EISDIR))
200-
return;
200+
return0;
201201
fprintf(stderr,_("%s: could not open file \"%s\": %s\n"),
202202
progname,fname,strerror(errno));
203-
return;
203+
return-1;
204204
}
205205

206206
/*
@@ -217,6 +217,7 @@ pre_sync_fname(const char *fname, bool isdir, const char *progname)
217217
#endif
218218

219219
(void)close(fd);
220+
return0;
220221
}
221222

222223
#endif/* PG_FLUSH_DATA_WORKS */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp