WIP: Cleaned up some compile-time warnings...
...that cropped up in SDL2 branch.
This commit is contained in:
parent
a530896e20
commit
9d70b5837c
6 changed files with 21 additions and 42 deletions
|
|
@ -172,6 +172,9 @@ http://www.tuxpaint.org/
|
|||
find . -name "*.c" -or -name "*.h" -exec indent -nbfda -npcs -npsl -bli0 --no-tabs {} \;
|
||||
Bill Kendrick <bill@newbreedsoftware.com>
|
||||
|
||||
* WIP: Cleaned up some compile-time warnings that cropped up in SDL2 branch.
|
||||
Bill Kendrick <bill@newbreedsoftware.com>
|
||||
|
||||
* Documentation updates:
|
||||
---------------------
|
||||
* New "Quickstart Guide" document added.
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: June 2, 2022
|
||||
Last updated: November 14, 2022
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -490,10 +490,7 @@ void perspective_release(magic_api * api, int which,
|
|||
}
|
||||
else if (which == TOOL_RUSH)
|
||||
{
|
||||
int h1, h2, w, h, hh, x, y, dx1, dy1;
|
||||
Uint8 r1, g1, b1, r2, g2, b2;
|
||||
Uint32 r, g, b;
|
||||
float pct;
|
||||
int h1, h2, w, h, hh, dx1, dy1;
|
||||
SDL_Surface *scaled_surf;
|
||||
SDL_Surface * aux1;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
dirwalk.c
|
||||
|
||||
Copyright (c) 2009-2021
|
||||
Copyright (c) 2009-2022
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last modified: 2021.11.08
|
||||
Last modified: November 14, 2022
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -350,13 +350,17 @@ void tp_ftw(SDL_Surface * screen, SDL_Texture * texture,
|
|||
tp_ftw_str *dir_names = NULL;
|
||||
int d_namlen;
|
||||
int add_rsrc;
|
||||
#ifdef __ANDROID__
|
||||
unsigned dlen;
|
||||
#endif
|
||||
|
||||
dir[dirlen++] = '/';
|
||||
dir[dirlen] = '\0';
|
||||
//printf("processing directory %s %d\n", dir, dirlen);
|
||||
|
||||
#ifdef __ANDROID__
|
||||
dlen = dirlen;
|
||||
#endif
|
||||
|
||||
/* Open the directory: */
|
||||
d = opendir(dir);
|
||||
|
|
|
|||
32
src/fonts.c
32
src/fonts.c
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
fonts.c
|
||||
|
||||
Copyright (c) 2009-2021
|
||||
Copyright (c) 2009-2022
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last modified: 2021.11.08
|
||||
Last modified: November 14, 2022
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -1764,34 +1764,6 @@ const char *TuxPaint_Font_FontFaceStyleName(TuxPaint_Font * tpf)
|
|||
|
||||
#ifndef NO_SDLPANGO
|
||||
|
||||
void ssdl_color_to_pango_color(SDL_Color sdl_color,
|
||||
SDLPango_Matrix * pango_color)
|
||||
{
|
||||
Uint8 pc[4][4];
|
||||
|
||||
pc[0][0] = 0;
|
||||
pc[1][0] = 0;
|
||||
pc[2][0] = 0;
|
||||
pc[3][0] = 0;
|
||||
|
||||
pc[0][1] = 0;
|
||||
pc[1][1] = 0;
|
||||
pc[2][1] = 0;
|
||||
pc[3][1] = 0;
|
||||
|
||||
pc[0][2] = 0;
|
||||
pc[1][2] = 0;
|
||||
pc[2][2] = 0;
|
||||
pc[3][2] = 0;
|
||||
|
||||
pc[0][3] = 0;
|
||||
pc[1][3] = 0;
|
||||
pc[2][3] = 0;
|
||||
pc[3][3] = 0;
|
||||
|
||||
memcpy(pango_color, pc, 16);
|
||||
}
|
||||
|
||||
void sdl_color_to_pango_color(SDL_Color sdl_color,
|
||||
SDLPango_Matrix * pango_color)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last modified: November 14, 2022
|
||||
*/
|
||||
|
||||
#include "debug.h"
|
||||
|
|
@ -1955,6 +1957,8 @@ struct osk_keyboard *osk_clicked(on_screen_keyboard * keyboard, int x, int y)
|
|||
#ifdef OSK_DEBUG
|
||||
printf("len = %d\n", len);
|
||||
printf("event.text.text = \"%s\"\n", event.text.text);
|
||||
#else
|
||||
len = len; /* Avoid 'set but not used' warning */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1797,7 +1797,6 @@ static SDL_Surface *render_text_w(TuxPaint_Font * restrict font,
|
|||
Uint16 *ustr;
|
||||
|
||||
#ifndef NO_SDLPANGO
|
||||
unsigned int i, j;
|
||||
int utfstr_max;
|
||||
char *utfstr;
|
||||
SDLPango_Matrix pango_color;
|
||||
|
|
@ -2213,7 +2212,7 @@ static void render_color_button(int the_color, SDL_Surface * decoration,
|
|||
SDL_Surface * icon);
|
||||
static void handle_color_changed(void);
|
||||
|
||||
static int do_quick_eraser(void);
|
||||
static void do_quick_eraser(void);
|
||||
|
||||
static int do_slideshow(void);
|
||||
static void play_slideshow(int *selected, int num_selected, char *dirname,
|
||||
|
|
@ -13943,7 +13942,7 @@ static double loadinfo(const char *const fname, stamp_type * inf)
|
|||
/**
|
||||
* FIXME
|
||||
*/
|
||||
static int SDLCALL NondefectiveBlit(SDL_Surface * src, SDL_Rect * srcrect,
|
||||
static int SDLCALL NondefectiveBlit(SDL_Surface * src, const SDL_Rect * srcrect,
|
||||
SDL_Surface * dst, SDL_Rect * dstrect)
|
||||
{
|
||||
int dstx = 0;
|
||||
|
|
@ -14019,7 +14018,7 @@ static int SDLCALL NondefectiveBlit(SDL_Surface * src, SDL_Rect * srcrect,
|
|||
*/
|
||||
static void autoscale_copy_smear_free(SDL_Surface * src, SDL_Surface * dst,
|
||||
int SDLCALL(*blit) (SDL_Surface * src,
|
||||
SDL_Rect * srcrect,
|
||||
const SDL_Rect * srcrect,
|
||||
SDL_Surface * dst,
|
||||
SDL_Rect * dstrect))
|
||||
{
|
||||
|
|
@ -24392,7 +24391,7 @@ static int do_color_sel(int temp_mode)
|
|||
* (Eventually, we'll be able to detect tablet stylus erasers;
|
||||
* but waiting for https://github.com/libsdl-org/SDL/issues/2217)
|
||||
*/
|
||||
static int do_quick_eraser(void) {
|
||||
static void do_quick_eraser(void) {
|
||||
SDL_Event event;
|
||||
SDLKey key;
|
||||
int val_x, val_y, motioner;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue