aboutsummaryrefslogtreecommitdiffstats
path: root/unix/vncconfig/vncconfig.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-04-21 02:18:22 +0200
committerPierre Ossman <ossman@cendio.se>2024-06-24 14:22:35 +0200
commit12b3f4021641537b90727b23d42de5dff59006cd (patch)
treed494cda8c019a53989099a44b05aca2e0a4fff8a /unix/vncconfig/vncconfig.cxx
parent4a71ac5bb79e3cd53499255f231c490fc9a5627b (diff)
downloadtigervnc-12b3f4021641537b90727b23d42de5dff59006cd.tar.gz
tigervnc-12b3f4021641537b90727b23d42de5dff59006cd.zip
Avoid shadowing variables
It's a source of confusion and possibly bugs to reuse the same variable name for multiple things.
Diffstat (limited to 'unix/vncconfig/vncconfig.cxx')
-rw-r--r--unix/vncconfig/vncconfig.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/unix/vncconfig/vncconfig.cxx b/unix/vncconfig/vncconfig.cxx
index 6f1f43dc..ab7c6315 100644
--- a/unix/vncconfig/vncconfig.cxx
+++ b/unix/vncconfig/vncconfig.cxx
@@ -66,10 +66,10 @@ char* programName = nullptr;
Display* dpy;
int vncExtEventBase, vncExtErrorBase;
-static bool getBoolParam(Display* dpy, const char* param) {
+static bool getBoolParam(Display* dpy_, const char* param) {
char* data;
int len;
- if (XVncExtGetParam(dpy, param, &data, &len)) {
+ if (XVncExtGetParam(dpy_, param, &data, &len)) {
if (strcmp(data,"1") == 0) return true;
}
return false;
@@ -80,12 +80,12 @@ class VncConfigWindow : public TXWindow, public TXEventHandler,
public TXCheckboxCallback,
public QueryResultCallback {
public:
- VncConfigWindow(Display* dpy)
- : TXWindow(dpy, 300, 100),
- acceptClipboard(dpy, "Accept clipboard from viewers", this, false, this),
- setPrimaryCB(dpy, "Also set primary selection", this, false, this),
- sendClipboard(dpy, "Send clipboard to viewers", this, false, this),
- sendPrimaryCB(dpy, "Send primary selection to viewers", this,false,this),
+ VncConfigWindow(Display* dpy_)
+ : TXWindow(dpy_, 300, 100),
+ acceptClipboard(dpy_, "Accept clipboard from viewers", this, false, this),
+ setPrimaryCB(dpy_, "Also set primary selection", this, false, this),
+ sendClipboard(dpy_, "Send clipboard to viewers", this, false, this),
+ sendPrimaryCB(dpy_, "Send primary selection to viewers", this,false,this),
queryConnectDialog(nullptr)
{
int y = yPad;
@@ -278,8 +278,8 @@ int main(int argc, char** argv)
} else if (strcmp(argv[i], "-list") == 0) {
int nParams;
char** list = XVncExtListParams(dpy, &nParams);
- for (int i = 0; i < nParams; i++) {
- printf("%s\n",list[i]);
+ for (int n = 0; n < nParams; n++) {
+ printf("%s\n",list[n]);
}
XVncExtFreeParamList(list);
} else if (strcmp(argv[i], "-set") == 0) {