[Bf-blender-cvs] [a3c6304a276] master: Cleanup: quiet possible comma misuse warning in feestyle PyAPI

Campbell Barton noreply at git.blender.org
Wed Jul 29 03:01:33 CEST 2020


Commit: a3c6304a2767adcb133beee3a73fb960ab75b928
Author: Campbell Barton
Date:   Wed Jul 29 10:53:00 2020 +1000
Branches: master
https://developer.blender.org/rBa3c6304a2767adcb133beee3a73fb960ab75b928

Cleanup: quiet possible comma misuse warning in feestyle PyAPI

===================================================================

M	source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
M	source/blender/freestyle/intern/python/BPy_Id.cpp
M	source/blender/freestyle/intern/python/BPy_Operators.cpp
M	source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
M	source/blender/freestyle/intern/python/BPy_ViewShape.cpp
M	source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
M	source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
M	source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
M	source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
M	source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
M	source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
M	source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
M	source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
M	source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
M	source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
M	source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
M	source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
M	source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
M	source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
M	source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
M	source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
M	source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
M	source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp

===================================================================

diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
index 2c226e330d7..3c2f022adb6 100644
--- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
+++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
@@ -108,7 +108,7 @@ static int FrsMaterial_init(BPy_FrsMaterial *self, PyObject *args, PyObject *kwd
       self->m = new FrsMaterial(*m);
     }
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(args,
                                        kwds,
                                        "O&O&O&O&O&fi",
diff --git a/source/blender/freestyle/intern/python/BPy_Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp
index 4f61ba847f6..eb0eb661e3d 100644
--- a/source/blender/freestyle/intern/python/BPy_Id.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Id.cpp
@@ -75,7 +75,7 @@ static int Id_init(BPy_Id *self, PyObject *args, PyObject *kwds)
   if (PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist_1, &Id_Type, &brother)) {
     self->id = new Id(*(((BPy_Id *)brother)->id));
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(args, kwds, "|ii", (char **)kwlist_2, &first, &second)) {
     self->id = new Id(first, second);
   }
diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp
index 510e823ba55..56f95b8ecbb 100644
--- a/source/blender/freestyle/intern/python/BPy_Operators.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp
@@ -365,8 +365,8 @@ static PyObject *Operators_sequential_split(BPy_Operators * /*self*/,
       return NULL;
     }
   }
-  else if (PyErr_Clear(),
-           (f = 0.0f),
+  else if ((void)PyErr_Clear(),
+           (void)(f = 0.0f),
            PyArg_ParseTupleAndKeywords(
                args, kwds, "O!|f", (char **)kwlist_2, &UnaryPredicate0D_Type, &obj1, &f)) {
     if (!((BPy_UnaryPredicate0D *)obj1)->up0D) {
@@ -484,8 +484,8 @@ static PyObject *Operators_recursive_split(BPy_Operators * /*self*/,
       return NULL;
     }
   }
-  else if (PyErr_Clear(),
-           (f = 0.0f),
+  else if ((void)PyErr_Clear(),
+           (void)(f = 0.0f),
            PyArg_ParseTupleAndKeywords(args,
                                        kwds,
                                        "O!O!O!|f",
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
index 5f5407e82e3..214385f74ad 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
@@ -110,7 +110,7 @@ static int StrokeAttribute_init(BPy_StrokeAttribute *self, PyObject *args, PyObj
       self->sa = new StrokeAttribute(*(((BPy_StrokeAttribute *)obj1)->sa));
     }
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(args,
                                        kwds,
                                        "O!O!f",
@@ -123,7 +123,7 @@ static int StrokeAttribute_init(BPy_StrokeAttribute *self, PyObject *args, PyObj
     self->sa = new StrokeAttribute(
         *(((BPy_StrokeAttribute *)obj1)->sa), *(((BPy_StrokeAttribute *)obj2)->sa), t);
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(args,
                                        kwds,
                                        "ffffff",
diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
index f59ae15ae01..2adcae13e6d 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
@@ -88,7 +88,7 @@ static int ViewShape_init(BPy_ViewShape *self, PyObject *args, PyObject *kwds)
       self->py_ss = ((BPy_ViewShape *)obj)->py_ss;
     }
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist_2, &SShape_Type, &obj)) {
     BPy_SShape *py_ss = (BPy_SShape *)obj;
     self->vs = new ViewShape(py_ss->ss);
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
index 6af80c4bfd9..81dd79ff270 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
@@ -95,7 +95,7 @@ static int CurvePoint_init(BPy_CurvePoint *self, PyObject *args, PyObject *kwds)
       self->cp = new CurvePoint(*(((BPy_CurvePoint *)obj1)->cp));
     }
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(args,
                                        kwds,
                                        "O!O!f",
@@ -107,7 +107,7 @@ static int CurvePoint_init(BPy_CurvePoint *self, PyObject *args, PyObject *kwds)
                                        &t2d)) {
     self->cp = new CurvePoint(((BPy_SVertex *)obj1)->sv, ((BPy_SVertex *)obj2)->sv, t2d);
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(args,
                                        kwds,
                                        "O!O!f",
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
index 71a87c2c01e..c01f1f17000 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
@@ -72,7 +72,7 @@ static int SVertex_init(BPy_SVertex *self, PyObject *args, PyObject *kwds)
       self->sv = new SVertex(*(((BPy_SVertex *)obj)->sv));
     }
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(
                args, kwds, "O&O!", (char **)kwlist_2, convert_v3, v, &Id_Type, &obj)) {
     Vec3r point_3d(v[0], v[1], v[2]);
diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
index b4c08714af0..519bd72db3b 100644
--- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
@@ -107,7 +107,7 @@ static int StrokeVertex_init(BPy_StrokeVertex *self, PyObject *args, PyObject *k
       self->sv = new StrokeVertex(*(((BPy_StrokeVertex *)obj1)->sv));
     }
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(args,
                                        kwds,
                                        "O!O!f",
@@ -129,7 +129,7 @@ static int StrokeVertex_init(BPy_StrokeVertex *self, PyObject *args, PyObject *k
     }
     self->sv = new StrokeVertex(sv1, sv2, t3d);
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(
                args, kwds, "O!", (char **)kwlist_3, &CurvePoint_Type, &obj1)) {
     CurvePoint *cp = ((BPy_CurvePoint *)obj1)->cp;
@@ -139,8 +139,8 @@ static int StrokeVertex_init(BPy_StrokeVertex *self, PyObject *args, PyObject *k
     }
     self->sv = new StrokeVertex(cp);
   }
-  else if (PyErr_Clear(),
-           (obj2 = 0),
+  else if ((void)PyErr_Clear(),
+           (void)(obj2 = 0),
            PyArg_ParseTupleAndKeywords(args,
                                        kwds,
                                        "O!|O!",
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
index 8a09e7722ea..187ab94360a 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
@@ -81,7 +81,7 @@ static int FEdge_init(BPy_FEdge *self, PyObject *args, PyObject *kwds)
       self->fe = new FEdge(*(((BPy_FEdge *)obj1)->fe));
     }
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(args,
                                        kwds,
                                        "O!O!",
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
index fd434f9c4ef..788dfa78992 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
@@ -72,7 +72,7 @@ static int FrsCurve_init(BPy_FrsCurve *self, PyObject *args, PyObject *kwds)
       self->c = new Curve(*(((BPy_FrsCurve *)obj)->c));
     }
   }
-  else if (PyErr_Clear(),
+  else if ((void)PyErr_Clear(),
            PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist_2, &Id_Type, &obj)) {
     self->c = new Curve(*(((BPy_Id *)obj)->id));
   }
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
index 3a25ddb0252..b31efe1f923 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
@@ -157,7 +157,8 @@ static PyObject *Stroke_resample(BPy_Stroke *self, PyObject *args, PyObject *kwd
       return NULL;
     }
   }
-  else if (PyErr_Clear(), PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &f)) {
+  else if ((void)PyErr_Clear(),
+           PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &f)) {
     if (self->s->Resample(f) < 0) {
       PyErr_SetString(PyExc_RuntimeError, "Stroke resampling (by vertex interval) failed");
       return NULL;
diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
index 285100193d3..9cdc344081e 100644
--- a/source/blender/freestyle/intern/python/I

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list