diff options
author | Reid Kleckner <rnk@google.com> | 2016-06-17 18:12:50 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-06-17 18:12:50 +0000 |
commit | 45769d7967f4593ebe90da50d898edc7fe48da98 (patch) | |
tree | 516dc51fffa70fc5a759bf87242995cf2ccb4182 /lib/profile/InstrProfilingValue.c | |
parent | d80ed424db5879f5250e0be79332bc4c31a8ef29 (diff) |
Fix most MSVC warnings in compiler-rt profiling library
Here's the warnings and how they were fixed:
- InstrProfilingUtil.c(110): warning C4013: '_open_osfhandle' undefined; assuming extern returning int
Include io.h to get the prototype.
- warning C4005: 'FILE_MAP_EXECUTE': macro redefinition
Stop trying to support pre-XP versions of Windows, don't attempt to
define this macro.
- InstrProfilingWriter.c(271): warning C4221: nonstandard extension used: 'Data': cannot be initialized using address of automatic variable 'Header'
- InstrProfilingWriter.c(275): warning C4221: nonstandard extension used: 'Data': cannot be initialized using address of automatic variable 'Zeroes'
Turn this warning off. This is definitely legal in C++, all compilers
accept it, and I only have room for half of one language standard in my
brain.
- InstrProfilingValue.c(320): warning C4113: 'uint32_t (__cdecl *)()' differs in parameter lists from 'uint32_t (__cdecl *)(void)'
Fix this with an explicit (void) in the prototype.
- InstrProfilingMerge.c.obj : warning LNK4006: _VPMergeHook already defined in InstrProfilingMergeFile.c.obj; second definition ignored
Last remaining warning. This is from linking a selectany definition with
a strong definition. We need to sort out weak symbols in compiler-rt in
general, though.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/InstrProfilingValue.c')
-rw-r--r-- | lib/profile/InstrProfilingValue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/profile/InstrProfilingValue.c b/lib/profile/InstrProfilingValue.c index b6a982dcb..93957e323 100644 --- a/lib/profile/InstrProfilingValue.c +++ b/lib/profile/InstrProfilingValue.c @@ -309,7 +309,7 @@ static ValueProfNode *getNextNValueData(uint32_t VK, uint32_t Site, return VNode; } -static uint32_t getValueProfDataSizeWrapper() { +static uint32_t getValueProfDataSizeWrapper(void) { return getValueProfDataSize(&RTRecordClosure); } |