diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-05-08 21:15:08 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2019-05-18 06:41:36 -0400 |
commit | 91f1119528b57f94d178f0cfb12efafd0c90bbc9 (patch) | |
tree | b98c68ebf25eb4c477fa99c2548d2c8a4804a4c0 /src/Converters.c | |
parent | 43a65ae23370e0f7fb427e96c6d9037d8fa1af35 (diff) |
fixes cppcheck "style" warnings (mostly variable-scope)
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/Converters.c')
-rw-r--r-- | src/Converters.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Converters.c b/src/Converters.c index e812930..32e3641 100644 --- a/src/Converters.c +++ b/src/Converters.c @@ -467,7 +467,6 @@ Boolean XtCvtStringToPixel( XtPerDisplay pd = _XtGetPerDisplay(dpy); Colormap colormap; Status status; - String params[1]; Cardinal num_params=1; if (*num_args != 2) { @@ -497,6 +496,7 @@ Boolean XtCvtStringToPixel( if (status == 0) { _Xconst _XtString msg; _Xconst _XtString type; + String params[1]; params[0] = str; /* Server returns a specific error code but Xlib discards it. Ugh */ @@ -1629,7 +1629,6 @@ Boolean XtCvtStringToCommandArgArray( String *strarray, *ptr; char *src; char *dst, *dst_str; - char *start; int tokens, len; if (*num_args != 0) @@ -1643,6 +1642,8 @@ Boolean XtCvtStringToCommandArgArray( tokens = 0; while (*src != '\0') { + char *start; + /* skip whitespace */ while (IsWhitespace(*src) || IsNewline(*src)) src++; @@ -1704,10 +1705,8 @@ static void ArgArrayDestructor( XrmValuePtr args, Cardinal *num_args) { - _XtString *strarray; - if (closure) { - strarray = (_XtString*) closure; + _XtString *strarray = (_XtString*) closure; XtFree(*strarray); XtFree((char *) strarray); } |