Workaround compiler warning
Some compilers warns on uninitialized value in impossible case: warning: variable 'result' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
This commit is contained in:
parent
ea46d3ab68
commit
95fa1a69e4
1 changed files with 2 additions and 3 deletions
|
@ -463,12 +463,11 @@ rotate_position(struct screen *screen, int32_t x, int32_t y) {
|
||||||
result.x = w - x;
|
result.x = w - x;
|
||||||
result.y = h - y;
|
result.y = h - y;
|
||||||
break;
|
break;
|
||||||
case 3:
|
default:
|
||||||
|
assert(rotation == 3);
|
||||||
result.x = y;
|
result.x = y;
|
||||||
result.y = w - x;
|
result.y = w - x;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
assert(!"Unreachable");
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue