summaryrefslogtreecommitdiff
path: root/src/backend/storage/file/sharedfileset.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-05-02 15:52:54 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-05-02 15:52:54 -0400
commitfbb2e9a030ee7a3fa20ce402e4b1da9809b4eb52 (patch)
tree79bd48ec2dccce2957bf56d62019f24a86ab181c /src/backend/storage/file/sharedfileset.c
parent447dbf7aa7909bca76048042d6734ee8f5249d0f (diff)
Fix assorted compiler warnings seen in the buildfarm.
Failure to use DatumGetFoo/FooGetDatum macros correctly, or at all, causes some warnings about sign conversion. This is just cosmetic at the moment but in principle it's a type violation, so clean up the instances I could find. autoprewarm.c and sharedfileset.c contained code that unportably assumed that pid_t is the same size as int. We've variously dealt with this by casting pid_t to int or to unsigned long for printing purposes; I went with the latter. Fix uninitialized-variable warning in RestoreGUCState. This is a live bug in some sense, but of no great significance given that nobody is very likely to care what "line number" is associated with a GUC that hasn't got a source file recorded.
Diffstat (limited to 'src/backend/storage/file/sharedfileset.c')
-rw-r--r--src/backend/storage/file/sharedfileset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/storage/file/sharedfileset.c b/src/backend/storage/file/sharedfileset.c
index 0ac86965366..d41b39a1771 100644
--- a/src/backend/storage/file/sharedfileset.c
+++ b/src/backend/storage/file/sharedfileset.c
@@ -214,9 +214,9 @@ SharedFileSetPath(char *path, SharedFileSet *fileset, Oid tablespace)
char tempdirpath[MAXPGPATH];
TempTablespacePath(tempdirpath, tablespace);
- snprintf(path, MAXPGPATH, "%s/%s%d.%u.sharedfileset",
+ snprintf(path, MAXPGPATH, "%s/%s%lu.%u.sharedfileset",
tempdirpath, PG_TEMP_FILE_PREFIX,
- fileset->creator_pid, fileset->number);
+ (unsigned long) fileset->creator_pid, fileset->number);
}
/*