Skip to content

Commit 81fd08e

Browse files
committed
Fix additional -Wconversion warnings
1 parent 06f0068 commit 81fd08e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"maintainer": true
1414
}
1515
],
16-
"version": "6.4.4",
16+
"version": "6.4.5",
1717
"frameworks": "*",
1818
"platforms": "*",
1919
"export": {

src/tiny_event_queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static void enqueue_with_data(
6969
reinterpret(self, _self, tiny_event_queue_t*);
7070
unsigned capacity = tiny_ring_buffer_capacity(&self->ring_buffer);
7171
unsigned count = tiny_ring_buffer_count(&self->ring_buffer);
72-
unsigned event_size = event_with_data_overhead + data_size;
72+
unsigned event_size = (unsigned)(event_with_data_overhead + data_size);
7373

7474
if((capacity - count) <= event_size) {
7575
self->unable_to_queue_callback();

src/tiny_hsm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static void send_entries(tiny_hsm_t* self, tiny_hsm_state_t after, tiny_hsm_stat
4949
return;
5050
}
5151

52-
for(uint8_t n = distance_between(self, to, after) - 1; n > 0; n--) {
52+
for(uint8_t n = (uint8_t)(distance_between(self, to, after) - 1); n > 0; n--) {
5353
nth_parent(self, to, n)(self, tiny_hsm_signal_entry, NULL);
5454
}
5555

src/tiny_ram_key_value_store.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static const i_tiny_key_value_store_api_t api = {
5757

5858
static void initialize_storage(tiny_ram_key_value_store_t* self)
5959
{
60-
tiny_key_value_store_key_t last_key = self->configuration->key_value_pair_count - 1;
60+
tiny_key_value_store_key_t last_key = (tiny_key_value_store_key_t)(self->configuration->key_value_pair_count - 1);
6161
uint16_t last_offset = offset(self, last_key);
6262
uint8_t last_size = size(&self->interface, last_key);
6363
memset(self->storage, 0, last_offset + last_size);

0 commit comments

Comments
 (0)