[cairo] [PATCH 6/6] cairo-script: Compare status with CSI enums

Bryce W. Harrington b.harrington at samsung.com
Wed Jan 29 18:14:14 PST 2014


CSI_STATUS_SUCCESS is defined as equivalent to CAIRO_STATUS_SUCCESS.
We should prefer the former when comparing against csi_status_t
variables, else we'll get a warning:

cairo-script-interpreter.c:637:23: warning: comparison between
‘csi_status_t’ and ‘enum _cairo_status’ [-Wenum-compare]

Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
---
 util/cairo-script/cairo-script-interpreter.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/cairo-script/cairo-script-interpreter.c b/util/cairo-script/cairo-script-interpreter.c
index bdd5255..50170fc 100644
--- a/util/cairo-script/cairo-script-interpreter.c
+++ b/util/cairo-script/cairo-script-interpreter.c
@@ -634,7 +634,7 @@ cairo_script_interpreter_finish (csi_t *ctx)
     if (! ctx->finished) {
 	_csi_finish (ctx);
 	ctx->finished = 1;
-    } else if (status == CAIRO_STATUS_SUCCESS) {
+    } else if (status == CSI_STATUS_SUCCESS) {
 	status = ctx->status = CSI_STATUS_INTERPRETER_FINISHED;
     }
 
-- 
1.7.9.5


More information about the cairo mailing list