mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
cleanup: Ensure that error codes are always initialised.
In this case, there was no way it would not be, but a code change down the stack could cause a variable to become uninitialised. This avoids a gcc warning and is more locally-correct.
This commit is contained in:
parent
101e235131
commit
1ce6aab5da
|
@ -8,12 +8,13 @@ g++ -O3 -o /dev/null amalgamation.cc \
|
|||
"${CPPFLAGS[@]}" \
|
||||
"${LDFLAGS[@]}" \
|
||||
-std=c++11 \
|
||||
-pedantic \
|
||||
-fdiagnostics-color=always \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-Wno-aggregate-return \
|
||||
-Werror \
|
||||
-Wno-aggressive-loop-optimizations \
|
||||
-Wno-error=null-dereference \
|
||||
-Wno-error=type-limits \
|
||||
-Wno-float-conversion \
|
||||
-Wno-format-signedness \
|
||||
-Wno-missing-field-initializers \
|
||||
|
|
|
@ -1655,6 +1655,7 @@ bool tox_file_send_chunk(Tox *tox, uint32_t friend_number, uint32_t file_number,
|
|||
}
|
||||
|
||||
/* can't happen */
|
||||
SET_ERROR_PARAMETER(error, TOX_ERR_FILE_SEND_CHUNK_OK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user