Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

ITT_FUNCTION_TASK() cannot be compiled when UNICODE is defined #9

Open
grebenyukaa opened this issue Feb 6, 2017 · 1 comment
Open

Comments

@grebenyukaa
Copy link

grebenyukaa commented Feb 6, 2017

Hi!

While compiling ITT_FUNCTION_TASK() I get the following error:

IntelSEAPI\include\itt_notify.hpp(47): error C2664: 'void (const __itt_domain *,__itt_id,__itt_string_handle *,const wchar_t *,std::size_t)': cannot convert argument 4 from 'const char *' to 'const wchar_t *'

Judging from the source code there indeed is an error:

  • AddArg() is implemented like that:

void AddArg(__itt_string_handle* pName, const char* value)
{
__itt_metadata_str_add(m_pDomain, m_id, pName, value, 0);
}

  • With UNICODE enabled the __itt_metadata_str_add is expanded as __itt_metadata_str_addW macro, which is declared as:

void ITTAPI __itt_metadata_str_addW(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t *data, size_t length);

Note const wchar_t *data here and const char* value being passed from AddArg()

P.S. This was tested on the 28.01.17 release version

@araud
Copy link
Contributor

araud commented Jun 22, 2017

Hello, Alexander!
Would you like to contribute the fix?
I am not sure how soon I will have time to address it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants