Cleanup: gcc7.1 warnings

This commit is contained in:
Campbell Barton 2017-05-16 12:46:52 +10:00
parent 12651aba03
commit d508b69e44
2 changed files with 2 additions and 2 deletions

View File

@ -878,7 +878,7 @@ static hash_key key_from_chunk_ref(
{
/* in C, will fill in a reusable array */
BChunk *chunk = cref->link;
BLI_assert(info->accum_read_ahead_bytes * info->chunk_stride);
BLI_assert((info->accum_read_ahead_bytes * info->chunk_stride) != 0);
if (info->accum_read_ahead_bytes <= chunk->data_len) {
hash_key key;

View File

@ -187,7 +187,7 @@ static void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, const double mval[2
/* use doubles here, to make sure a "1.0" (no rotation) doesn't become 9.999999e-01, which gives 0.02 for acos */
double deler = (((dx1 * dx1 + dy1 * dy1) +
(dx2 * dx2 + dy2 * dy2) -
(dx3 * dx3 + dy3 * dy3)) / (2.0 * ((A * B) ? (A * B) : 1.0)));
(dx3 * dx3 + dy3 * dy3)) / (2.0 * (((A * B) != 0.0) ? (A * B) : 1.0)));
/* ((A * B) ? (A * B) : 1.0) this takes care of potential divide by zero errors */
float dphi;