scangobj: Avoid generating unused params
commite39e5f87cb9157a6991ae72c7a7ea014f6df7a02
authorPavel Grunt <pavelgrunt@gmail.com>
Sun, 29 Oct 2017 09:07:23 +0000 (29 10:07 +0100)
committerStefan Sauer <ensonic@users.sf.net>
Wed, 1 Nov 2017 20:06:21 +0000 (1 21:06 +0100)
tree22901307033f3093aeaf50bc85185bee1297aa6b
parentbee6efd6793aafc65a1592e6edaca33bc2ff33aa
scangobj: Avoid generating unused params

The main function params may be unused depending on type init function
definition. That may lead to generating a warning about unused in a
project using gtk-doc, eg:
    DOC   Scanning header files
    DOC   Introspecting gobjects
  spice-gtk-scan.c: In function ‘main’:
  spice-gtk-scan.c:126:11: warning: unused parameter ‘argc’ [-Wunused-parameter]
   main (int argc, char *argv[])
           ^~~~
  spice-gtk-scan.c:126:23: warning: unused parameter ‘argv’ [-Wunused-parameter]
   main (int argc, char *argv[])

Check for the presence of argc and argv in the type init function
and generate main function params accordingly

https://bugzilla.gnome.org/show_bug.cgi?id=773879
gtkdoc/scangobj.py