mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
Merge pull request #3811 from radarhere/warnings
Fixed several warnings
This commit is contained in:
commit
2f84482871
|
@ -345,13 +345,11 @@ static size_t
|
|||
text_layout_raqm(PyObject* string, FontObject* self, const char* dir, PyObject *features,
|
||||
const char* lang, GlyphInfo **glyph_info, int mask)
|
||||
{
|
||||
int i = 0;
|
||||
size_t i = 0, count = 0, start = 0;
|
||||
raqm_t *rq;
|
||||
size_t count = 0;
|
||||
raqm_glyph_t *glyphs = NULL;
|
||||
raqm_glyph_t_01 *glyphs_01 = NULL;
|
||||
raqm_direction_t direction;
|
||||
size_t start = 0;
|
||||
|
||||
rq = (*p_raqm.create)();
|
||||
if (rq == NULL) {
|
||||
|
@ -423,15 +421,15 @@ text_layout_raqm(PyObject* string, FontObject* self, const char* dir, PyObject *
|
|||
}
|
||||
|
||||
if (features != Py_None) {
|
||||
int len;
|
||||
int j, len;
|
||||
PyObject *seq = PySequence_Fast(features, "expected a sequence");
|
||||
if (!seq) {
|
||||
goto failed;
|
||||
}
|
||||
|
||||
len = PySequence_Size(seq);
|
||||
for (i = 0; i < len; i++) {
|
||||
PyObject *item = PySequence_Fast_GET_ITEM(seq, i);
|
||||
for (j = 0; j < len; j++) {
|
||||
PyObject *item = PySequence_Fast_GET_ITEM(seq, j);
|
||||
char *feature = NULL;
|
||||
Py_ssize_t size = 0;
|
||||
PyObject *bytes;
|
||||
|
@ -604,12 +602,12 @@ text_layout(PyObject* string, FontObject* self, const char* dir, PyObject *featu
|
|||
static PyObject*
|
||||
font_getsize(FontObject* self, PyObject* args)
|
||||
{
|
||||
int i, x, y_max, y_min;
|
||||
int x, y_max, y_min;
|
||||
FT_Face face;
|
||||
int xoffset, yoffset;
|
||||
const char *dir = NULL;
|
||||
const char *lang = NULL;
|
||||
size_t count;
|
||||
size_t i, count;
|
||||
GlyphInfo *glyph_info = NULL;
|
||||
PyObject *features = Py_None;
|
||||
|
||||
|
@ -702,7 +700,8 @@ font_getsize(FontObject* self, PyObject* args)
|
|||
static PyObject*
|
||||
font_render(FontObject* self, PyObject* args)
|
||||
{
|
||||
int i, x, y;
|
||||
int x;
|
||||
unsigned int y;
|
||||
Imaging im;
|
||||
int index, error, ascender;
|
||||
int load_flags;
|
||||
|
@ -717,7 +716,7 @@ font_render(FontObject* self, PyObject* args)
|
|||
int xx, x0, x1;
|
||||
const char *dir = NULL;
|
||||
const char *lang = NULL;
|
||||
size_t count;
|
||||
size_t i, count;
|
||||
GlyphInfo *glyph_info;
|
||||
PyObject *features = NULL;
|
||||
|
||||
|
|
|
@ -771,10 +771,10 @@ ellipse(Imaging im, int x0, int y0, int x1, int y1,
|
|||
int w, h;
|
||||
int x, y;
|
||||
int cx, cy;
|
||||
int lx, ly;
|
||||
int sx, sy;
|
||||
int lx_inner, ly_inner;
|
||||
int sx_inner, sy_inner;
|
||||
int lx = 0, ly = 0;
|
||||
int sx = 0, sy = 0;
|
||||
int lx_inner = 0, ly_inner = 0;
|
||||
int sx_inner = 0, sy_inner = 0;
|
||||
DRAW* draw;
|
||||
INT32 ink;
|
||||
Edge* e;
|
||||
|
|
|
@ -194,7 +194,7 @@ static void
|
|||
j2k_set_cinema_params(Imaging im, int components, opj_cparameters_t *params)
|
||||
{
|
||||
float rate;
|
||||
unsigned n;
|
||||
int n;
|
||||
|
||||
/* These settings have been copied from opj_compress in the OpenJPEG
|
||||
sources. */
|
||||
|
@ -522,7 +522,7 @@ j2k_encode_entry(Imaging im, ImagingCodecState state)
|
|||
|
||||
tile_ndx = 0;
|
||||
for (y = 0; y < tiles_y; ++y) {
|
||||
unsigned ty0 = params.cp_ty0 + y * tile_height;
|
||||
int ty0 = params.cp_ty0 + y * tile_height;
|
||||
unsigned ty1 = ty0 + tile_height;
|
||||
unsigned pixy, pixh;
|
||||
|
||||
|
@ -535,7 +535,7 @@ j2k_encode_entry(Imaging im, ImagingCodecState state)
|
|||
pixh = ty1 - ty0;
|
||||
|
||||
for (x = 0; x < tiles_x; ++x) {
|
||||
unsigned tx0 = params.cp_tx0 + x * tile_width;
|
||||
int tx0 = params.cp_tx0 + x * tile_width;
|
||||
unsigned tx1 = tx0 + tile_width;
|
||||
unsigned pixx, pixw;
|
||||
unsigned data_size;
|
||||
|
|
Loading…
Reference in New Issue
Block a user