summaryrefslogtreecommitdiff
path: root/instance.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2018-05-16 22:14:22 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2018-05-16 23:10:54 +0200
commit3389df7d5d85edc9453c3bd7f3556154152af501 (patch)
tree7e21dd96367e5b09216a915572f0703708c3de15 /instance.c
parent8390f85af4a379f4e0a9305912d6d62ce09c6fc1 (diff)
downloadlibsigrokdecode-3389df7d5d85edc9453c3bd7f3556154152af501.tar.gz
libsigrokdecode-3389df7d5d85edc9453c3bd7f3556154152af501.zip
srd_inst_channel_set_all(): Fix a compiler warning (-Wshadow).
instance.c:266:11: warning: declaration of ā€˜lā€™ shadows a previous local [-Wshadow] GSList *l = g_slist_nth(di->decoder->channels, i); ^ instance.c:206:9: note: shadowed declaration is here GList *l; ^
Diffstat (limited to 'instance.c')
-rw-r--r--instance.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/instance.c b/instance.c
index 17809be..8d660a4 100644
--- a/instance.c
+++ b/instance.c
@@ -263,11 +263,11 @@ SRD_API int srd_inst_channel_set_all(struct srd_decoder_inst *di,
srd_dbg("Final channel map:");
num_required_channels = g_slist_length(di->decoder->channels);
for (i = 0; i < di->dec_num_channels; i++) {
- GSList *l = g_slist_nth(di->decoder->channels, i);
- if (!l)
- l = g_slist_nth(di->decoder->opt_channels,
+ GSList *ll = g_slist_nth(di->decoder->channels, i);
+ if (!ll)
+ ll = g_slist_nth(di->decoder->opt_channels,
i - num_required_channels);
- pdch = l->data;
+ pdch = ll->data;
srd_dbg(" - PD ch idx %d (%s) = input data ch idx %d (%s)", i,
pdch->id, new_channelmap[i],
(i < num_required_channels) ? "required" : "optional");