[dia] [warningectomy] implicit conversion from enumeration type ...



commit 1ec9c647621d8cdf798f0e3ec18f36d2fb1a16a2
Author: Hans Breuer <hans breuer org>
Date:   Sat May 25 23:55:57 2013 +0200

    [warningectomy] implicit conversion from enumeration type ...
    
    e.g.:
    standard-path.c:232:27: warning: implicit conversion from enumeration type 'MyHandleIds' to different 
enumeration type 'HandleId' [-Wconversion]
      obj->handles[0]->id   = _HANDLE_OBJ_POS;
                            ~ ^~~~~~~~~~~~~~~

 lib/standard-path.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/lib/standard-path.c b/lib/standard-path.c
index 896fdec..7e63b4e 100644
--- a/lib/standard-path.c
+++ b/lib/standard-path.c
@@ -47,13 +47,17 @@
 
 #define NUM_HANDLES 8
 
-typedef enum {
+/* anonymous enum to avoid warning:
+ * implicit conversion from enumeration type 'MyHandleIds' to different
+ * enumeration type 'HandleId'
+ */
+enum {
   _HANDLE_OBJ_POS = HANDLE_CUSTOM1,
   _HANDLE_SHEAR,
   _HANDLE_ROTATE,
   _HANDLE_PERSPECTIVE,
   _HANDLE_REF_POS
-} MyHandleIds;
+};
 
 typedef enum {
   PDO_STROKE = (1<<0),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]