diff options
| author | Matthias Melcher <git@matthiasm.com> | 2019-02-02 17:47:55 +0100 |
|---|---|---|
| committer | Matthias Melcher <git@matthiasm.com> | 2019-02-02 17:47:55 +0100 |
| commit | 452a410a3ea02f58930c4b3cc5a04bbb6b3e7070 (patch) | |
| tree | d243cf51c8b20541b46ba051d646c91b5aad1825 /test/demo.cxx | |
| parent | 76668c7cc11c80f337bd7d04d6adead49c8a636f (diff) | |
STR #2714: remove new shadow lint for MacOS
Diffstat (limited to 'test/demo.cxx')
| -rw-r--r-- | test/demo.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/demo.cxx b/test/demo.cxx index 4736b941e..aada148a6 100644 --- a/test/demo.cxx +++ b/test/demo.cxx @@ -295,7 +295,7 @@ void dobut(Fl_Widget *, long arg) { #elif defined __APPLE__ char *cmd = strdup(menus[men].icommand[bn]); - char *arg = strchr(cmd, ' '); + char *macosArg = strchr(cmd, ' '); char command[2048], path[2048], app_path[2048]; @@ -309,21 +309,21 @@ void dobut(Fl_Widget *, long arg) { CFRelease(cc_app_path); if (*app_path) { if (memcmp(app_path + strlen(app_path) - 4, ".app", 4) == 0) { - char *n = strrchr(app_path, '/'); - if (n) *n = 0; + char *lastSlash = strrchr(app_path, '/'); + if (lastSlash) *lastSlash = 0; } fl_chdir(app_path); } char *name = new char[strlen(cmd) + 5]; strcpy(name, cmd); - if (arg) name[arg-cmd] = 0; + if (macosArg) name[macosArg-cmd] = 0; strcat(name, ".app"); // check whether app bundle exists if ( ! fl_filename_isdir(name) ) strcpy(name, cmd); - if (arg) { + if (macosArg) { const char *fluidpath; - *arg = 0; + *macosArg = 0; #if defined USING_XCODE fl_filename_absolute(path, 2048, "../../../../test/"); fluidpath = "fluid.app"; @@ -334,9 +334,9 @@ void dobut(Fl_Widget *, long arg) { if ( ! fl_filename_isdir(fluidpath) ) fluidpath = "../fluid"; #endif if (strcmp(cmd, "../fluid/fluid")==0) { - sprintf(command, "open %s --args %s%s", fluidpath, path, arg+1); + sprintf(command, "open %s --args %s%s", fluidpath, path, macosArg+1); } else { - sprintf(command, "open %s --args %s%s", name, path, arg+1); + sprintf(command, "open %s --args %s%s", name, path, macosArg+1); } } else { sprintf(command, "open %s", name); |
