aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/alsa
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-05-22 10:59:30 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2018-05-22 10:59:30 +0200
commit89ddd7e4af936b4c049f6c8de5925fe0b9a78b13 (patch)
tree68ad9af5bc2d73f1394cd750627e7c85a034718b /plugins/alsa
parent2af80583a462fa0f71d0250bca03db5a4cf22fe8 (diff)
Fixed compilation warnings with gcc-7.2.0
Replaced some 'size_t' by 'int' Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins/alsa')
-rw-r--r--plugins/alsa/alsa-api-backend.c2
-rw-r--r--plugins/alsa/alsa-api-frontend.c6
-rw-r--r--plugins/alsa/alsa-api-mixer.c2
-rw-r--r--plugins/alsa/alsa-api-streams.c4
-rw-r--r--plugins/alsa/alsa-api-zones.c4
5 files changed, 9 insertions, 9 deletions
diff --git a/plugins/alsa/alsa-api-backend.c b/plugins/alsa/alsa-api-backend.c
index 85d9566..7ece023 100644
--- a/plugins/alsa/alsa-api-backend.c
+++ b/plugins/alsa/alsa-api-backend.c
@@ -148,7 +148,7 @@ STATIC int ProcessOneSndCard(CtlSourceT *source, json_object *sndcardJ, AlsaPcmI
if (error) goto OnErrorExit;
break;
case json_type_array:
- snd->ccount = (int) json_object_array_length(sinkJ);
+ snd->ccount = json_object_array_length(sinkJ);
snd->channels = calloc(snd->ccount + 1, sizeof (AlsaPcmChannelT));
for (int idx = 0; idx < snd->ccount; idx++) {
json_object *channelJ = json_object_array_get_idx(sinkJ, idx);
diff --git a/plugins/alsa/alsa-api-frontend.c b/plugins/alsa/alsa-api-frontend.c
index 11b8a7e..d475ae9 100644
--- a/plugins/alsa/alsa-api-frontend.c
+++ b/plugins/alsa/alsa-api-frontend.c
@@ -149,7 +149,7 @@ STATIC int ProcessOneLoop(CtlSourceT *source, json_object *loopJ, AlsaSndLoopT *
if (error) goto OnErrorExit;
break;
case json_type_array:
- rcount = (int) json_object_array_length(rampsJ);
+ rcount = json_object_array_length(rampsJ);
loop->ramps = calloc(rcount+1, sizeof (AlsaVolRampT));
for (int idx = 0; idx < rcount; idx++) {
json_object *rampJ = json_object_array_get_idx(rampsJ, idx);
@@ -218,7 +218,7 @@ PUBLIC int SndFrontend(CtlSourceT *source, json_object *argsJ) {
// or syntax purpose array is accepted but frontend should have a single driver entry
json_type type = json_object_get_type(argsJ);
if (type == json_type_array) {
- size_t count = json_object_array_length(argsJ);
+ int count = json_object_array_length(argsJ);
if (count != 1) {
AFB_ApiError(source->api, "SndFrontend: mixer=%s frontend only support on input driver args=%s", mixer->uid, json_object_get_string(argsJ));
goto OnErrorExit;
@@ -242,4 +242,4 @@ PUBLIC int SndFrontend(CtlSourceT *source, json_object *argsJ) {
OnErrorExit:
return -1;
-} \ No newline at end of file
+}
diff --git a/plugins/alsa/alsa-api-mixer.c b/plugins/alsa/alsa-api-mixer.c
index b910b9f..432997c 100644
--- a/plugins/alsa/alsa-api-mixer.c
+++ b/plugins/alsa/alsa-api-mixer.c
@@ -59,7 +59,7 @@ static void MixerApiVerbCB(AFB_ReqT request) {
// Free attached resources and free mixer
if (delete) {
- for (int idx; mixer->streams[idx].uid; idx++) {
+ for (int idx = 0; mixer->streams[idx].uid; idx++) {
AlsaLoopStreamT *stream = &mixer->streams[idx];
AFB_ApiNotice(source->api, "cleaning mixer=%s stream=%s", mixer->uid, stream->uid);
diff --git a/plugins/alsa/alsa-api-streams.c b/plugins/alsa/alsa-api-streams.c
index 3923048..7dce960 100644
--- a/plugins/alsa/alsa-api-streams.c
+++ b/plugins/alsa/alsa-api-streams.c
@@ -225,7 +225,7 @@ PUBLIC int LoopStreams(CtlSourceT *source, json_object *argsJ, json_object **res
AlsaLoopStreamT *loopStream;
int error;
long value;
- size_t count;
+ int count;
assert(mixer);
@@ -423,4 +423,4 @@ PUBLIC int LoopStreams(CtlSourceT *source, json_object *argsJ, json_object **res
OnErrorExit:
return -1;
-} \ No newline at end of file
+}
diff --git a/plugins/alsa/alsa-api-zones.c b/plugins/alsa/alsa-api-zones.c
index 8f383df..27bf72a 100644
--- a/plugins/alsa/alsa-api-zones.c
+++ b/plugins/alsa/alsa-api-zones.c
@@ -98,7 +98,7 @@ PUBLIC int SndZones(CtlSourceT *source, json_object *argsJ) {
SoftMixerHandleT *mixerHandle = (SoftMixerHandleT*) source->context;
AlsaSndZoneT *zones=NULL;
int error;
- size_t count;
+ int count;
assert(mixerHandle);
@@ -153,4 +153,4 @@ PUBLIC int SndZones(CtlSourceT *source, json_object *argsJ) {
OnErrorExit:
if (zones) free(zones);
return -1;
-} \ No newline at end of file
+}