HotKeyIt / ahkdll-v2-release

AutoHotkey_H v2 release
http://hotkeyit.github.io/v2/
GNU General Public License v2.0
63 stars 15 forks source link

Suppressing warnings in Yaml.ahk #5

Closed ELFoglalt closed 6 years ago

ELFoglalt commented 7 years ago

Hey,

I am using your Yaml.ahk in a script with #Warn All enabled. Functionally the lib works perfectly, but in my attempt to make it warning free I ran into a problem. I managed to get rid of all but one UseUnsetLocal warning generated by the file:

Yaml_Quote() generates the following warning:

...\Yaml.ahk (450) : ==> Warning: This variable has not been assigned a value.
     Specifically: E

The code in question is

Yaml_Quote(ByRef L,F,Q,B,ByRef E)
{
  Return ( F="\" && !E && (E:=1) ) || ( E && !(E:=0) && ( L := L ("\" F) ) )
}

I can't seem to figure out why this warning is generated to begin with. Any idea if this is a bug in v2, or I'm just missing something? I tried re-writing the function in a less concise manner, but using the variable E seems to be creating warnings regardless.

Note: Not sure if this is the correct place for this issue, as you do have a separate Yaml.ahk page, but the v2 compatible file I'm using only seems to be present here.

HotKeyIt commented 7 years ago

Try latest version and post example script if you have more warnings.

ELFoglalt commented 6 years ago

Didn't have time for this project in the last months, so not sure which commit was it exactly, but the issue seems to be gone as of right now. Marking as closed.