Cleanup minor warnings
This commit is contained in:
parent
3919b40ad2
commit
76b014b8bb
@ -717,7 +717,7 @@ static NSVGgradient* nsvg__createGradient(NSVGparser* p, const char* id, const f
|
|||||||
NSVGgradientData* ref = NULL;
|
NSVGgradientData* ref = NULL;
|
||||||
NSVGgradientStop* stops = NULL;
|
NSVGgradientStop* stops = NULL;
|
||||||
NSVGgradient* grad;
|
NSVGgradient* grad;
|
||||||
float dx, dy, d;
|
float dx, dy;
|
||||||
int nstops = 0;
|
int nstops = 0;
|
||||||
NSVG_NOTUSED(bounds);
|
NSVG_NOTUSED(bounds);
|
||||||
|
|
||||||
@ -745,7 +745,6 @@ static NSVGgradient* nsvg__createGradient(NSVGparser* p, const char* id, const f
|
|||||||
// Calculate transform aligned to the line
|
// Calculate transform aligned to the line
|
||||||
dx = data->linear.x2 - data->linear.x1;
|
dx = data->linear.x2 - data->linear.x1;
|
||||||
dy = data->linear.y2 - data->linear.y1;
|
dy = data->linear.y2 - data->linear.y1;
|
||||||
d = sqrtf(dx*dx + dy*dy);
|
|
||||||
grad->xform[0] = dy; grad->xform[1] = -dx;
|
grad->xform[0] = dy; grad->xform[1] = -dx;
|
||||||
grad->xform[2] = dx; grad->xform[3] = dy;
|
grad->xform[2] = dx; grad->xform[3] = dy;
|
||||||
grad->xform[4] = data->linear.x1; grad->xform[5] = data->linear.y1;
|
grad->xform[4] = data->linear.x1; grad->xform[5] = data->linear.y1;
|
||||||
@ -1659,10 +1658,8 @@ static void nsvg__pathVLineTo(NSVGparser* p, float* cpx, float* cpy, float* args
|
|||||||
static void nsvg__pathCubicBezTo(NSVGparser* p, float* cpx, float* cpy,
|
static void nsvg__pathCubicBezTo(NSVGparser* p, float* cpx, float* cpy,
|
||||||
float* cpx2, float* cpy2, float* args, int rel)
|
float* cpx2, float* cpy2, float* args, int rel)
|
||||||
{
|
{
|
||||||
float x1, y1, x2, y2, cx1, cy1, cx2, cy2;
|
float x2, y2, cx1, cy1, cx2, cy2;
|
||||||
|
|
||||||
x1 = *cpx;
|
|
||||||
y1 = *cpy;
|
|
||||||
if (rel) {
|
if (rel) {
|
||||||
cx1 = *cpx + args[0];
|
cx1 = *cpx + args[0];
|
||||||
cy1 = *cpy + args[1];
|
cy1 = *cpy + args[1];
|
||||||
@ -1947,6 +1944,7 @@ static void nsvg__parsePath(NSVGparser* p, const char** attr)
|
|||||||
if (s) {
|
if (s) {
|
||||||
nsvg__resetPath(p);
|
nsvg__resetPath(p);
|
||||||
cpx = 0; cpy = 0;
|
cpx = 0; cpy = 0;
|
||||||
|
cpx2 = 0; cpy2 = 0;
|
||||||
closedFlag = 0;
|
closedFlag = 0;
|
||||||
nargs = 0;
|
nargs = 0;
|
||||||
|
|
||||||
@ -2458,7 +2456,10 @@ static void nsvg__imageBounds(NSVGparser* p, float* bounds)
|
|||||||
{
|
{
|
||||||
NSVGshape* shape;
|
NSVGshape* shape;
|
||||||
shape = p->image->shapes;
|
shape = p->image->shapes;
|
||||||
if (shape == NULL) return;
|
if (shape == NULL) {
|
||||||
|
bounds[0] = bounds[1] = bounds[2] = bounds[3] = 0.0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
bounds[0] = shape->bounds[0];
|
bounds[0] = shape->bounds[0];
|
||||||
bounds[1] = shape->bounds[1];
|
bounds[1] = shape->bounds[1];
|
||||||
bounds[2] = shape->bounds[2];
|
bounds[2] = shape->bounds[2];
|
||||||
|
Loading…
Reference in New Issue
Block a user