diff options
author | Owen Taylor <otaylor@redhat.com> | 2005-08-23 05:18:48 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@redhat.com> | 2005-08-23 05:18:48 +0000 |
commit | 099060f9254e972ae2d28f51815b75da01736a8f (patch) | |
tree | f7a51326aec8560483306beffe1ef385e03f67ca | |
parent | 704874c16538f0653f37be253f2fc3d89963667d (diff) |
Some fixes for warnings from sparse (Part of #4208, Kjartan Maraas)
Use NULL, not 0.
Fix C99'ism of mixed code and declarations.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | src/cairo-matrix.c | 13 | ||||
-rw-r--r-- | test/cairo-test.c | 2 |
3 files changed, 18 insertions, 7 deletions
@@ -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 diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c index 236678a8..4073ea4e 100644 --- a/src/cairo-matrix.c +++ b/src/cairo-matrix.c @@ -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)); diff --git a/test/cairo-test.c b/test/cairo-test.c index 3e36dd72..18d036bc 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -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; |