Clean up GCC warnings (2019-08-29 edition)

Updated most parts of the code that were throwing warnings in GCC.
This commit is contained in:
Bill Kendrick 2019-08-30 00:00:18 -07:00
parent 1f2c6c3c4e
commit 7938480174
16 changed files with 110 additions and 141 deletions

View file

@ -8,7 +8,7 @@
Credits: Andrew Corcoran <akanewbie@gmail.com>
Copyright (c) 2002-2009 by Bill Kendrick and others; see AUTHORS.txt
Copyright (c) 2002-2019 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com
http://www.tuxpaint.org/
@ -27,7 +27,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
Last updated: May 6, 2009
Last updated: August 29, 2019
$Id$
*/
@ -86,9 +86,11 @@ void perspective_line(void *ptr_to_api, int which, SDL_Surface * canvas, SDL_Sur
/* Unused?
static const int perspective_AMOUNT = 300;
static const int perspective_RADIUS = 16;
static const double perspective_SHARPEN = 1.0;
*/
Uint8 perspective_r, perspective_g, perspective_b;
int corner;
int dash;
@ -396,12 +398,10 @@ void perspective_release(magic_api * api, int which,
}
else
{
int aux_x, aux_y, aux_h, aux_w;
int aux_h, aux_w;
aux_h = canvas->h * canvas->h / new_h;
aux_w = canvas->w * aux_h / canvas->h;
aux_x = canvas->w / 2 - aux_w / 2;
aux_y = canvas->h / 2 - aux_h / 2;
update_rect->x = canvas->w / 2 - aux_w / 2;
update_rect->y = canvas->h / 2 - aux_h / 2;