summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/profile/GCDAProfiling.c
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2019-02-07 23:58:48 +0000
committerReid Kleckner <rnk@google.com>2019-02-07 23:58:48 +0000
commitc20ff8084551fd3b4eb7485bab864da8f1b61e5d (patch)
tree510c68de74c4b4ddc9f1ad54f498dbba18a3a074 /compiler-rt/lib/profile/GCDAProfiling.c
parentc795e62ecec32c351424e6959c95caf3e37e507a (diff)
downloadbcm5719-llvm-c20ff8084551fd3b4eb7485bab864da8f1b61e5d.tar.gz
bcm5719-llvm-c20ff8084551fd3b4eb7485bab864da8f1b61e5d.zip
Silence -Wformat warnings about GetLastError returning ULONG
llvm-svn: 353485
Diffstat (limited to 'compiler-rt/lib/profile/GCDAProfiling.c')
-rw-r--r--compiler-rt/lib/profile/GCDAProfiling.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
index 099aa115f7d..498c05900bf 100644
--- a/compiler-rt/lib/profile/GCDAProfiling.c
+++ b/compiler-rt/lib/profile/GCDAProfiling.c
@@ -268,14 +268,14 @@ static int map_file() {
mmap_handle = CreateFileMapping(mmap_fd, NULL, PAGE_READWRITE, DWORD_HI(file_size), DWORD_LO(file_size), NULL);
if (mmap_handle == NULL) {
- fprintf(stderr, "profiling: %s: cannot create file mapping: %d\n", filename,
- GetLastError());
+ fprintf(stderr, "profiling: %s: cannot create file mapping: %lu\n",
+ filename, GetLastError());
return -1;
}
write_buffer = MapViewOfFile(mmap_handle, FILE_MAP_WRITE, 0, 0, file_size);
if (write_buffer == NULL) {
- fprintf(stderr, "profiling: %s: cannot map: %d\n", filename,
+ fprintf(stderr, "profiling: %s: cannot map: %lu\n", filename,
GetLastError());
CloseHandle(mmap_handle);
return -1;
@@ -297,18 +297,18 @@ static int map_file() {
static void unmap_file() {
#if defined(_WIN32)
if (!FlushViewOfFile(write_buffer, file_size)) {
- fprintf(stderr, "profiling: %s: cannot flush mapped view: %d\n", filename,
+ fprintf(stderr, "profiling: %s: cannot flush mapped view: %lu\n", filename,
GetLastError());
}
if (!UnmapViewOfFile(write_buffer)) {
- fprintf(stderr, "profiling: %s: cannot unmap mapped view: %d\n", filename,
+ fprintf(stderr, "profiling: %s: cannot unmap mapped view: %lu\n", filename,
GetLastError());
}
if (!CloseHandle(mmap_handle)) {
- fprintf(stderr, "profiling: %s: cannot close file mapping handle: %d\n", filename,
- GetLastError());
+ fprintf(stderr, "profiling: %s: cannot close file mapping handle: %lu\n",
+ filename, GetLastError());
}
mmap_handle = NULL;
OpenPOWER on IntegriCloud