Skip to content

Commit

Permalink
The value of a composite expression shall not be assigned to an objec…
Browse files Browse the repository at this point in the history
…t with wider essential type
  • Loading branch information
zoff99 committed Sep 12, 2023
1 parent 2d3777c commit e6bca9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toxav/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ static int m_msi_packet(Tox *tox, int32_t friendnumber, const uint8_t *data, uin
/* we need to prepend 1 byte (packet id) to data
* do this without calloc, memcpy and free in the future
*/
size_t length_new = length + 1;
size_t length_new = (size_t)length + 1;
uint8_t *data_new = (uint8_t *)calloc(length_new, sizeof(uint8_t));

if (data_new == nullptr) {
Expand Down

0 comments on commit e6bca9b

Please sign in to comment.