dark-panda / gd2-ffij

The Ruby/GD2 interface using FFI bindings.
Other
19 stars 12 forks source link

Several ugly warnings when run with ruby option -w (warning) #5

Closed hadmut closed 12 years ago

hadmut commented 12 years ago

Hi,

when using gd2-ffij from with a ruby program run with option -w, ruby complains a lot about the gd2-ffij code, e.g.:

/home/hadmut/.gem/gems/gd2-ffij-0.0.4/lib/gd2-ffij.rb:31: warning: instance variable @gd_library_name not initialized /home/hadmut/.gem/gems/gd2-ffij-0.0.4/lib/gd2/image.rb:325: warning: shadowing outer local variable - row /home/hadmut/.gem/gems/gd2-ffij-0.0.4/lib/gd2/image.rb:323: warning: assigned but unused variable - ptr /home/hadmut/.gem/gems/gd2-ffij-0.0.4/lib/gd2/image.rb:242: warning: instance variable @palette not initialized /home/hadmut/.gem/gems/gd2-ffij-0.0.4/lib/gd2/canvas.rb:427: warning: instance variable @tile not initialized /home/hadmut/.gem/gems/gd2-ffij-0.0.4/lib/gd2/image.rb:242: warning: instance variable @palette not initialized

(and sorry for the delay. I wanted to submit the report on saturday, but was too busy...)

dark-panda commented 12 years ago

Fixed in 60bb776c33d11a75cfac26fd2ae5770a5d41bc0f.