eserte / perl-tk

the perl module Tk
https://metacpan.org/release/Tk
Other
44 stars 31 forks source link

tkGlue.c, Event.xs: prevent compiler warnings #60

Closed chrstphrchvz closed 3 years ago

chrstphrchvz commented 5 years ago

Use "%"UVuf instead of "%d" to prevent compiler warnings:

Event.xs: In function ‘install_vtab’:
Event.xs:385:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
      warn("%s is strange size %d",name,size);
           ^~~~~~~~~~~~~~~~~~~~~~~      ~~~~

tkGlue.c: In function ‘install_vtab’:
tkGlue.c:5496:32: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
      warn("%s is strange size %d",name,size);
                               ~^       ~~~~
                               %ld