@@ -1438,7 +1438,7 @@ Tkapp_Call(PyObject *selfptr, PyObject *args)
1438
1438
marshal the parameters to the interpreter thread. */
1439
1439
Tkapp_CallEvent * ev ;
1440
1440
Tcl_Condition cond = NULL ;
1441
- PyObject * exc ;
1441
+ PyObject * exc = NULL ; // init to make static analyzers happy
1442
1442
if (!WaitForMainloop (self ))
1443
1443
return NULL ;
1444
1444
ev = (Tkapp_CallEvent * )attemptckalloc (sizeof (Tkapp_CallEvent ));
@@ -1712,7 +1712,8 @@ var_invoke(EventFunc func, PyObject *selfptr, PyObject *args, int flags)
1712
1712
TkappObject * self = (TkappObject * )selfptr ;
1713
1713
if (self -> threaded && self -> thread_id != Tcl_GetCurrentThread ()) {
1714
1714
VarEvent * ev ;
1715
- PyObject * res , * exc ;
1715
+ // init 'res' and 'exc' to make static analyzers happy
1716
+ PyObject * res = NULL , * exc = NULL ;
1716
1717
Tcl_Condition cond = NULL ;
1717
1718
1718
1719
/* The current thread is not the interpreter thread. Marshal
@@ -2413,6 +2414,8 @@ _tkinter_tkapp_createcommand_impl(TkappObject *self, const char *name,
2413
2414
data -> self = self ;
2414
2415
data -> func = Py_NewRef (func );
2415
2416
if (self -> threaded && self -> thread_id != Tcl_GetCurrentThread ()) {
2417
+ err = 0 ; // init to make static analyzers happy
2418
+
2416
2419
Tcl_Condition cond = NULL ;
2417
2420
CommandEvent * ev = (CommandEvent * )attemptckalloc (sizeof (CommandEvent ));
2418
2421
if (ev == NULL ) {
@@ -2468,6 +2471,8 @@ _tkinter_tkapp_deletecommand_impl(TkappObject *self, const char *name)
2468
2471
TRACE (self , ("((sss))" , "rename" , name , "" ));
2469
2472
2470
2473
if (self -> threaded && self -> thread_id != Tcl_GetCurrentThread ()) {
2474
+ err = 0 ; // init to make static analyzers happy
2475
+
2471
2476
Tcl_Condition cond = NULL ;
2472
2477
CommandEvent * ev ;
2473
2478
ev = (CommandEvent * )attemptckalloc (sizeof (CommandEvent ));
0 commit comments