]> sigrok.org Git - sigrok-cli.git/commit
show: pass NULL parameter to config_key_has_cap() instead of uninitialized cg.
authorAurelien Jacobs <redacted>
Thu, 12 Feb 2015 16:08:33 +0000 (17:08 +0100)
committerAurelien Jacobs <redacted>
Thu, 12 Feb 2015 16:08:33 +0000 (17:08 +0100)
commit15db66c6a90ea967264b66b80d381b89847e3afa
tree18325794ad6d209a92ca6f9185b6d1f7219adc4a
parent84c250a2ee6152ec0d857f7be142f873fa44e640
show: pass NULL parameter to config_key_has_cap() instead of uninitialized cg.

It doesn't make sense to pass a cg to this config_key_has_cap() call
as it is trying to retrieve the device's global SR_CONF_LIMIT_SAMPLES.

This fixes the following warning:

show.c: In function ‘show_dev_detail’:
show.c:392:8: warning: ‘cg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     && config_key_has_cap(driver, sdi, cg, key, SR_CONF_LIST)) {
        ^
show.c