aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
diff options
context:
space:
mode:
authorEric <ewild@sysmocom.de>2020-04-16 00:11:16 +0200
committerEric <ewild@sysmocom.de>2020-04-16 00:11:16 +0200
commitef73893222e95c415387882f2c90c7cc88a341cb (patch)
tree34e01b0bad81a57a5ccf9145bc2601da897a4508 /Transceiver52M
parent0bf8882fb6b2b7860994810fc3376fa6d2d98ecb (diff)
shm: fix warnings
Diffstat (limited to 'Transceiver52M')
-rw-r--r--Transceiver52M/device/ipc/shm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Transceiver52M/device/ipc/shm.c b/Transceiver52M/device/ipc/shm.c
index 41de233..76f6151 100644
--- a/Transceiver52M/device/ipc/shm.c
+++ b/Transceiver52M/device/ipc/shm.c
@@ -8,7 +8,7 @@
/* Convert offsets to pointers */
struct ipc_shm_stream *ipc_shm_decode_stream(void *tall_ctx, struct ipc_shm_raw_region *root_raw, struct ipc_shm_raw_stream *stream_raw)
{
- int i;
+ unsigned int i;
struct ipc_shm_stream *stream;
stream = talloc_zero(tall_ctx, struct ipc_shm_stream);
stream = talloc_zero_size(tall_ctx, sizeof(struct ipc_shm_stream) +
@@ -38,7 +38,7 @@ struct ipc_shm_channel *ipc_shm_decode_channel(void *tall_ctx, struct ipc_shm_ra
}
struct ipc_shm_region *ipc_shm_decode_region(void *tall_ctx, struct ipc_shm_raw_region *root_raw)
{
- int i;
+ unsigned int i;
struct ipc_shm_region *root;
root = talloc_zero_size(tall_ctx, sizeof(struct ipc_shm_region) +
sizeof(struct ipc_shm_channel*) * root_raw->num_chans);
@@ -66,8 +66,8 @@ unsigned int ipc_shm_encode_smpl_buf(struct ipc_shm_raw_region *root_raw, struct
unsigned int ipc_shm_encode_stream(struct ipc_shm_raw_region *root_raw, struct ipc_shm_raw_stream *stream_raw, uint32_t num_buffers, uint32_t buffer_size)
{
- int i;
uint8_t* start = (uint8_t*)stream_raw;
+ unsigned int i;
unsigned int offset = sizeof(struct ipc_shm_raw_stream) + sizeof(uint32_t)*num_buffers;
fprintf(stderr, "encode: stream at offset %lu\n", (start - (uint8_t*)root_raw));
@@ -103,8 +103,8 @@ unsigned int ipc_shm_encode_channel(struct ipc_shm_raw_region *root_raw, struct
/* if root_raw is NULL, then do a dry run, aka only calculate final offset */
unsigned int ipc_shm_encode_region(struct ipc_shm_raw_region *root_raw, uint32_t num_chans, uint32_t num_buffers, uint32_t buffer_size)
{
- int i;
uint8_t* start = (uint8_t*)root_raw;
+ unsigned i;
unsigned int offset = sizeof(struct ipc_shm_raw_region) + sizeof(uint32_t)*num_chans;
if (root_raw)