summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkProgress.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-10 10:29:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-10 10:29:55 (GMT)
commitdac0d44e8ac09f7ff824c1ff952201122b60245e (patch)
tree51e1ecc4829a564ef487c9cd3b864a526884b47f /generic/ttk/ttkProgress.c
parent794c5c6783a20e8c42ee94337edb9e02eb06662a (diff)
downloadtk-dac0d44e8ac09f7ff824c1ff952201122b60245e.zip
tk-dac0d44e8ac09f7ff824c1ff952201122b60245e.tar.gz
tk-dac0d44e8ac09f7ff824c1ff952201122b60245e.tar.bz2
More usage of Tk_GetPixelsFromObj() and TCL_UNUSED(), all backported from Tk 8.7.
More TCL_UNUSED
Diffstat (limited to 'generic/ttk/ttkProgress.c')
-rw-r--r--generic/ttk/ttkProgress.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c
index 2a0ef4a..d83603a 100644
--- a/generic/ttk/ttkProgress.c
+++ b/generic/ttk/ttkProgress.c
@@ -96,7 +96,7 @@ static int AnimationEnabled(Progressbar *pb)
* Increments the -phase option, redisplays the widget,
* and reschedules itself if animation still enabled.
*/
-static void AnimateProgressProc(ClientData clientData)
+static void AnimateProgressProc(void *clientData)
{
Progressbar *pb = (Progressbar *)clientData;
@@ -185,10 +185,11 @@ static void VariableChanged(void *recordPtr, const char *value)
* +++ Widget class methods:
*/
-static void ProgressbarInitialize(Tcl_Interp *dummy, void *recordPtr)
+static void ProgressbarInitialize(
+ TCL_UNUSED(Tcl_Interp *),
+ void *recordPtr)
{
Progressbar *pb = (Progressbar *)recordPtr;
- (void)dummy;
pb->progress.variableTrace = 0;
pb->progress.timer = 0;
@@ -236,12 +237,12 @@ static int ProgressbarConfigure(Tcl_Interp *interp, void *recordPtr, int mask)
* Post-configuration hook:
*/
static int ProgressbarPostConfigure(
- Tcl_Interp *dummy, void *recordPtr, int mask)
+ TCL_UNUSED(Tcl_Interp *),
+ void *recordPtr,
+ TCL_UNUSED(int))
{
Progressbar *pb = (Progressbar *)recordPtr;
int status = TCL_OK;
- (void)dummy;
- (void)mask;
if (pb->progress.variableTrace) {
status = Ttk_FireTrace(pb->progress.variableTrace);
@@ -464,7 +465,7 @@ static int ProgressbarStartStopCommand(
prefix[0] = Tcl_NewStringObj(cmdName, -1);
prefix[1] = objv[0];
- Tcl_ListObjReplace(interp, cmd, 0,2, 2,prefix);
+ Tcl_ListObjReplace(interp, cmd, 0, 2, 2,prefix);
Tcl_IncrRefCount(cmd);
status = Tcl_EvalObjEx(interp, cmd, 0);
@@ -474,21 +475,23 @@ static int ProgressbarStartStopCommand(
}
static int ProgressbarStartCommand(
- void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
+ TCL_UNUSED(void *),
+ Tcl_Interp *interp,
+ int objc,
+ Tcl_Obj *const objv[])
{
- (void)recordPtr;
-
return ProgressbarStartStopCommand(
- interp, "::ttk::progressbar::start", objc, objv);
+ interp, "::ttk::progressbar::start", objc, objv);
}
static int ProgressbarStopCommand(
- void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
+ TCL_UNUSED(void *),
+ Tcl_Interp *interp,
+ int objc,
+ Tcl_Obj *const objv[])
{
- (void)recordPtr;
-
return ProgressbarStartStopCommand(
- interp, "::ttk::progressbar::stop", objc, objv);
+ interp, "::ttk::progressbar::stop", objc, objv);
}
static const Ttk_Ensemble ProgressbarCommands[] = {