Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
This repository was 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

Description

@grebenyukaa

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

Activity

  1. araud commented on Jun 22, 2017

    @araud
    Contributor

    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions