diff --git generic/tkImgPhoto.c generic/tkImgPhoto.c
index 3d17b7d552..cadbb2d8d2 100644
--- generic/tkImgPhoto.c
+++ generic/tkImgPhoto.c
@@ -787,11 +787,10 @@ ImgPhotoCmd(
 	    }
 	} else {
 	    typedef int (*NewStringWriteProc)(Tcl_Interp *interp,
-		    Tcl_Obj *formatString, Tk_PhotoImageBlock *blockPtr,
-		    void *dummy);
+		    Tcl_Obj *formatString, Tk_PhotoImageBlock *blockPtr);
 
 	    result = ((NewStringWriteProc)(void *)stringWriteProc)(interp,
-		    options.format, &block, NULL);
+		    options.format, &block);
 	}
 	if (options.background) {
 	    Tk_FreeColor(options.background);
