mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed warnings.
This commit is contained in:
parent
ac117322a9
commit
97f192969c
|
@ -662,7 +662,7 @@ void file_request_accept(Tox *m, int friendnumber, uint8_t filenumber, uint64_t
|
|||
uint16_t filename_length, void *userdata)
|
||||
{
|
||||
char msg[512];
|
||||
sprintf(msg, "[t] %u is sending us: %s of size %llu", friendnumber, filename, filesize);
|
||||
sprintf(msg, "[t] %u is sending us: %s of size %llu", friendnumber, filename, (long long unsigned int)filesize);
|
||||
new_lines(msg);
|
||||
|
||||
if (tox_file_sendcontrol(m, friendnumber, 1, filenumber, 0, 0, 0)) {
|
||||
|
@ -701,7 +701,9 @@ void write_file(Tox *m, int friendnumber, uint8_t filenumber, uint8_t *data, uin
|
|||
new_lines(msg);
|
||||
}
|
||||
|
||||
fwrite(data, length, 1, pFile);
|
||||
if (fwrite(data, length, 1, pFile) != 1)
|
||||
new_lines("Error writing to file");
|
||||
|
||||
fclose(pFile);
|
||||
}
|
||||
|
||||
|
|
|
@ -184,7 +184,8 @@ void file_print_control(Tox *m, int friendnumber, uint8_t recieve_send, uint8_t
|
|||
void write_file(Tox *m, int friendnumber, uint8_t filenumber, uint8_t *data, uint16_t length, void *userdata)
|
||||
{
|
||||
if (file_recv[filenumber].file != 0)
|
||||
fwrite(data, length, 1, file_recv[filenumber].file);
|
||||
if (fwrite(data, length, 1, file_recv[filenumber].file) != 1)
|
||||
printf("Error writing data\n");
|
||||
}
|
||||
|
||||
void print_online(Tox *tox, int friendnumber, uint8_t status, void *userdata)
|
||||
|
|
Loading…
Reference in New Issue
Block a user