# sscanf warning

**URL:** <https://qa.fmod.com/t/sscanf-warning/12319>\
**Category:** Unreal Engine\
**Created:** [February 18, 2016, 10:21pm UTC](https://qa.fmod.com/t/sscanf-warning/12319 "2016-02-18T22:21:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pwkmikekelly](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/pwkmikekelly/32/1763_2.png) [@pwkmikekelly](https://qa.fmod.com/u/pwkmikekelly)\
**Post date:** [February 18, 2016, 10:21pm UTC](https://qa.fmod.com/t/sscanf-warning/12319/1 "2016-02-18T22:21:21Z")

</div>

FYI, 1.07.07 has this build warning:

FMODStudio\Source\FMODStudioEditor\Private\FMODStudioEditorModule.cpp(433): warning C4996: ‘sscanf’: This function or variable may be unsafe. Consider using sscanf\_s instead. To disable deprecation, use \_CRT\_SECURE\_NO\_WARNINGS. See online help for details.

---

<div class="post-metadata">

**Author:** ![geoff](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@geoff](https://qa.fmod.com/u/geoff)\
**Post date:** [February 18, 2016, 11:45pm UTC](https://qa.fmod.com/t/sscanf-warning/12319/2 "2016-02-18T23:45:02Z")

</div>

The use of sscanf is perfect safe, but I’ll ifdef in the sscanf\_s version on windows to silence the warning.

---

<div class="post-metadata">

**Author:** ![pwkmikekelly](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/pwkmikekelly/32/1763_2.png) [@pwkmikekelly](https://qa.fmod.com/u/pwkmikekelly)\
**Post date:** [February 19, 2016, 12:29am UTC](https://qa.fmod.com/t/sscanf-warning/12319/3 "2016-02-19T00:29:55Z")

</div>

> [@](#):
>
> The use of sscanf is perfect safe, but I’ll ifdef in the sscanf\_s version on windows to silence the warning.

I fixed it by changing:

sscanf(TCHAR\_TO\_UTF8(\*StudioVersionString), “Version %x.%x.%x”, &Super, &Major, &Minor);

to:

StudioVersionString.Printf(TEXT(“Version %x.%x.%x”), &Super, &Major, &Minor);

---

<div class="post-metadata">

**Author:** ![geoff](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@geoff](https://qa.fmod.com/u/geoff)\
**Post date:** [February 19, 2016, 2:20am UTC](https://qa.fmod.com/t/sscanf-warning/12319/4 "2016-02-19T02:20:56Z")

</div>

Well, that would fix the warning, but scanf != printf 🙂

---

<div class="post-metadata">

**Author:** ![geoff](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@geoff](https://qa.fmod.com/u/geoff)\
**Post date:** [February 22, 2016, 12:21am UTC](https://qa.fmod.com/t/sscanf-warning/12319/5 "2016-02-22T00:21:02Z")

</div>

I’ve removed the sscanf and changed the code to use the unreal string parsing functionality. The warning should be gone in the next patch release.
