summaryrefslogtreecommitdiff
path: root/lib/profile
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
commitdfdb7ff77f3eec10000d4f55839e8e0e66c74a0e (patch)
treeb93d0826eb7887e3c90f1c07818482c3f8bee61b /lib/profile
parent0949d8ec7fa17b3babe0076bd4e3f2ab707c1659 (diff)
downloadcompiler-rt-dfdb7ff77f3eec10000d4f55839e8e0e66c74a0e.tar.gz
Silence -Wformat warnings about GetLastError returning ULONG
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353485 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile')
-rw-r--r--lib/profile/GCDAProfiling.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/profile/GCDAProfiling.c b/lib/profile/GCDAProfiling.c
index 099aa115f..498c05900 100644
--- a/lib/profile/GCDAProfiling.c
+++ b/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;