summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@gnome.org>2007-07-04 14:54:23 -0500
committerJonathon Jongsma <jjongsma@gnome.org>2007-07-04 15:24:17 -0500
commite10c4e12f7948cd6325812cbb089537231b1144e (patch)
treee73e074d9bcbcbf27413a1ff1dc0093c5ee6cbf0
parentebd5ef60afb32e88b0ab8c4c690aea3fc5b82085 (diff)
examples/, tests/: fix a bunch of minor compile errors when compiling with -Werror
-rw-r--r--ChangeLog10
-rw-r--r--examples/pdf-surface/main.cc2
-rw-r--r--examples/png_file/main.cc2
-rw-r--r--examples/ps-surface/main.cc2
-rw-r--r--examples/svg-surface/main.cc2
-rw-r--r--examples/text-rotate/text-rotate.cc3
-rw-r--r--tests/test-context.cc41
7 files changed, 37 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 97cac77..55c04b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2007-07-04 Jonathon Jongsma <jjongsma@gnome.org>
+ * examples/pdf-surface/main.cc:
+ * examples/png_file/main.cc:
+ * examples/ps-surface/main.cc:
+ * examples/svg-surface/main.cc:
+ * examples/text-rotate/text-rotate.cc:
+ * tests/test-context.cc: fix a bunch of minor compile errors when compiling
+ with -Werror
+
+2007-07-04 Jonathon Jongsma <jjongsma@gnome.org>
+
* configure.in: enable extra compiler warnings and -Werror if the
CAIROMM_DEVEL environment variable is set to 'on'. This caught the
following mistake.
diff --git a/examples/pdf-surface/main.cc b/examples/pdf-surface/main.cc
index 1f2e858..7ae44b5 100644
--- a/examples/pdf-surface/main.cc
+++ b/examples/pdf-surface/main.cc
@@ -9,7 +9,7 @@
#include <math.h>
#endif
-int main(int argc, char** argv)
+int main()
{
#ifdef CAIRO_HAS_PDF_SURFACE
diff --git a/examples/png_file/main.cc b/examples/png_file/main.cc
index 0ed059b..d34efca 100644
--- a/examples/png_file/main.cc
+++ b/examples/png_file/main.cc
@@ -9,7 +9,7 @@
#include <math.h>
#endif
-int main(int argc, char** argv)
+int main()
{
Cairo::RefPtr<Cairo::ImageSurface> surface =
Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, 600, 400);
diff --git a/examples/ps-surface/main.cc b/examples/ps-surface/main.cc
index c699e34..dc02fc9 100644
--- a/examples/ps-surface/main.cc
+++ b/examples/ps-surface/main.cc
@@ -9,7 +9,7 @@
#include <math.h>
#endif
-int main(int argc, char** argv)
+int main()
{
#ifdef CAIRO_HAS_PS_SURFACE
diff --git a/examples/svg-surface/main.cc b/examples/svg-surface/main.cc
index 463a2bf..eb25379 100644
--- a/examples/svg-surface/main.cc
+++ b/examples/svg-surface/main.cc
@@ -9,7 +9,7 @@
#include <math.h>
#endif
-int main(int argc, char** argv)
+int main()
{
#ifdef CAIRO_HAS_SVG_SURFACE
diff --git a/examples/text-rotate/text-rotate.cc b/examples/text-rotate/text-rotate.cc
index 2dbe798..14912ef 100644
--- a/examples/text-rotate/text-rotate.cc
+++ b/examples/text-rotate/text-rotate.cc
@@ -1,4 +1,3 @@
-/*
/* Copyright (C) 2005 The cairomm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -55,7 +54,7 @@ void draw(Cairo::RefPtr<Cairo::Context> cr, int width, int height)
cr->set_source_rgb(0.0, 0.0, 0.0);
- cr->translate(WIDTH / 2.0, HEIGHT / 2.0);
+ cr->translate(width / 2.0, height / 2.0);
cr->get_text_extents(text, extents);
diff --git a/tests/test-context.cc b/tests/test-context.cc
index bd0ce2a..2cbd246 100644
--- a/tests/test-context.cc
+++ b/tests/test-context.cc
@@ -231,26 +231,29 @@ test_current_point ()
}
test_suite*
-init_unit_test_suite( int argc, char* argv[] )
+init_unit_test_suite(int argc, char* argv[])
{
- test_suite* test= BOOST_TEST_SUITE( "Cairo::Context Tests" );
+ // compile even with -Werror
+ if (argc && argv) {}
- test->add (BOOST_TEST_CASE (&test_dashes));
- test->add (BOOST_TEST_CASE (&test_save_restore));
- test->add (BOOST_TEST_CASE (&test_operator));
- test->add (BOOST_TEST_CASE (&test_source));
- test->add (BOOST_TEST_CASE (&test_tolerance));
- test->add (BOOST_TEST_CASE (&test_antialias));
- test->add (BOOST_TEST_CASE (&test_fill_rule));
- test->add (BOOST_TEST_CASE (&test_line_width));
- test->add (BOOST_TEST_CASE (&test_line_cap));
- test->add (BOOST_TEST_CASE (&test_line_join));
- test->add (BOOST_TEST_CASE (&test_miter_limit));
- //test->add (BOOST_TEST_CASE (&test_matrix));
- //test->add (BOOST_TEST_CASE (&test_user_device));
- test->add (BOOST_TEST_CASE (&test_draw));
- test->add (BOOST_TEST_CASE (&test_clip));
- test->add (BOOST_TEST_CASE (&test_current_point));
+ test_suite* test= BOOST_TEST_SUITE( "Cairo::Context Tests" );
- return test;
+ test->add (BOOST_TEST_CASE (&test_dashes));
+ test->add (BOOST_TEST_CASE (&test_save_restore));
+ test->add (BOOST_TEST_CASE (&test_operator));
+ test->add (BOOST_TEST_CASE (&test_source));
+ test->add (BOOST_TEST_CASE (&test_tolerance));
+ test->add (BOOST_TEST_CASE (&test_antialias));
+ test->add (BOOST_TEST_CASE (&test_fill_rule));
+ test->add (BOOST_TEST_CASE (&test_line_width));
+ test->add (BOOST_TEST_CASE (&test_line_cap));
+ test->add (BOOST_TEST_CASE (&test_line_join));
+ test->add (BOOST_TEST_CASE (&test_miter_limit));
+ //test->add (BOOST_TEST_CASE (&test_matrix));
+ //test->add (BOOST_TEST_CASE (&test_user_device));
+ test->add (BOOST_TEST_CASE (&test_draw));
+ test->add (BOOST_TEST_CASE (&test_clip));
+ test->add (BOOST_TEST_CASE (&test_current_point));
+
+ return test;
}