-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
In Fiddle::ValueUtil#wrap_arg there is a long case-when for arg with an unreachable code path.
When arg and ty are of Array type, and ty[0] is TYPE_CHAR, there is another condition, for arg to be String at Line 101.
Even if this condition is fixed, val is undefined at Line 102 for this method.
Lines 95 to 106 in 04238ce
| when Array | |
| if( ty.is_a?(Array) ) # used only by struct | |
| case ty[0] | |
| when TYPE_VOIDP | |
| return arg.collect{|v| Integer(v)} | |
| when TYPE_CHAR | |
| if( arg.is_a?(String) ) | |
| return val.unpack('C*') | |
| end | |
| end | |
| end | |
| return arg |
Should Lines 100-103 be removed?
Metadata
Metadata
Assignees
Labels
No labels