Try

Debug("%s", (const char*)u32ToStringAsHex(*((uint32_t*)(matrix_values +
4))).c_str());

if that helps?

On Mon, Oct 16, 2023 at 4:04 PM [email protected] <[email protected]>
wrote:

> Warning is:
>
> ./Components/Igc.Bdl.Lib/Renderer.cpp:120:19: warning: format string is
> not a string literal (potentially insecure) [-Wformat-security]
>
>          SkDebugf((const
> char*)u32ToStringAsHex(*((uint32_t*)(matrix_values + 4))).c_str());
>
>                         ^
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> On Sunday, October 15, 2023 at 6:36:08 PM UTC-7 [email protected] wrote:
>
>> I am seeing an annoying warning by the emscripten compiler, that the MSVC
>> compiler doesn't give.
>>
>> It has to do with some code that is calling a function that takes (const
>> char[]) as a parameter while the variable being fed to it is a (const
>> char*).
>>
>> MSVC is fine with that, and emscripten is too. (it compiles)
>> But emscripten gives a series of ugly warnings about this being "unsafe".
>>
>> I tried casting the char pointer to a (const char[]) but then MSVC was
>> unhappy about that.
>>
>> Can you think of an alternate approach?
>> I don't *have *to do anything about this, but the warnings are ugly and
>> annoying.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/d72d7f53-e05d-462c-a616-c814bdbc9551n%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/d72d7f53-e05d-462c-a616-c814bdbc9551n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CA%2B6sJ-17srTdNE-hdBwHwHpMfCeEN3owkgsgNhTHbF1yo%3DmMdQ%40mail.gmail.com.

Reply via email to