mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-03 18:18:08 +02:00
Some fixes for warnings from sparse (Part of #4208, Kjartan Maraas)
Use NULL, not 0. Fix C99'ism of mixed code and declarations.
This commit is contained in:
parent
704874c165
commit
099060f925
3 changed files with 18 additions and 7 deletions
10
ChangeLog
10
ChangeLog
|
|
@ -1,3 +1,13 @@
|
|||
2005-08-23 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Some fixes for warnings from sparse (Part of #4208,
|
||||
Kjartan Maraas)
|
||||
|
||||
* test/cairo-test.c (create_xlib_surface): Use NULL, not 0.
|
||||
|
||||
* src/cairo-matrix.c (_cairo_matrix_transformed_circle_major_axis):
|
||||
Fix C99'ism of mixed code and declarations.
|
||||
|
||||
2005-08-23 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* BUGS: caps only added to last subpath: COVERED by
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ slim_hidden_def(cairo_matrix_init_identity);
|
|||
void
|
||||
cairo_matrix_init (cairo_matrix_t *matrix,
|
||||
double xx, double yx,
|
||||
|
||||
double xy, double yy,
|
||||
double x0, double y0)
|
||||
{
|
||||
|
|
@ -680,19 +681,19 @@ _cairo_matrix_is_integer_translation(const cairo_matrix_t *m,
|
|||
double
|
||||
_cairo_matrix_transformed_circle_major_axis (cairo_matrix_t *matrix, double radius)
|
||||
{
|
||||
double a, b, c, d;
|
||||
double a, b, c, d, f, g, h, i, j;
|
||||
|
||||
_cairo_matrix_get_affine (matrix,
|
||||
&a, &b,
|
||||
&c, &d,
|
||||
NULL, NULL);
|
||||
|
||||
double i = a*a + b*b;
|
||||
double j = c*c + d*d;
|
||||
i = a*a + b*b;
|
||||
j = c*c + d*d;
|
||||
|
||||
double f = 0.5 * (i + j);
|
||||
double g = 0.5 * (i - j);
|
||||
double h = a*c + b*d;
|
||||
f = 0.5 * (i + j);
|
||||
g = 0.5 * (i - j);
|
||||
h = a*c + b*d;
|
||||
|
||||
return radius * sqrt (f + sqrt (g*g+h*h));
|
||||
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ create_xlib_surface (int width, int height, void **closure)
|
|||
if (height == 0)
|
||||
height = 1;
|
||||
|
||||
xtc->dpy = dpy = XOpenDisplay (0);
|
||||
xtc->dpy = dpy = XOpenDisplay (NULL);
|
||||
if (xtc->dpy == NULL) {
|
||||
cairo_test_log ("Failed to open display: %s\n", XDisplayName(0));
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue