summaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2020-06-18 18:34:59 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2020-06-18 18:34:59 -0400
commita9d6701d977700b18e31a70cc7982431bc702095 (patch)
treeeb24677e90094a95c1461243b56e83309a47742b /src/parse.c
parentd2b4f0598086d4dd5caf3cdc218d0f97c37229ac (diff)
fix the cppcheck style- and format-warnings
also bump version to 1.0.11.1, reflecting ongoing work since release Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/parse.c b/src/parse.c
index d81c2f3..df6cce3 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -82,7 +82,7 @@ static unsigned char overflowbuff[20]; /* really only need one */
static int overflowlen;
static unsigned char **stringListSource, *currentString;
-static int doparse(int (*ifunc) (void), const char *srctypename,
+static int doparse(int (*ifunc)(void), const char *srctypename,
const char *srcname);
static int twmFileInput(void);
static int twmStringListInput(void);
@@ -93,14 +93,14 @@ extern int yylineno;
int ConstrainedMoveTime = 400; /* milliseconds, event times */
-int (*twmInputFunc) (void);
+int (*twmInputFunc)(void);
/**
* parse the .twmrc file
* \param filename the filename to parse. NULL indicates $HOME/.twmrc
*/
static int
-doparse(int (*ifunc) (void), const char *srctypename, const char *srcname)
+doparse(int (*ifunc)(void), const char *srctypename, const char *srcname)
{
mods = 0;
ptr = 0;
@@ -983,19 +983,20 @@ do_color_keyword(int keyword, int colormode, char *s)
static void
put_pixel_on_root(Pixel pixel)
{
- int i, addPixel = 1;
+ int addPixel = 1;
Atom pixelAtom, retAtom;
int retFormat;
unsigned long nPixels, retAfter;
unsigned char *retProp;
- Pixel *pixelProp;
pixelAtom = XInternAtom(dpy, "_MIT_PRIORITY_COLORS", True);
if (XGetWindowProperty(dpy, Scr->Root, pixelAtom, 0, 8192,
False, XA_CARDINAL, &retAtom,
&retFormat, &nPixels, &retAfter,
&retProp) == Success) {
- pixelProp = (Pixel *) retProp;
+ int i;
+ Pixel *pixelProp = (Pixel *) retProp;
+
for (i = 0; (unsigned long) i < nPixels; i++)
if (pixel == pixelProp[i])
addPixel = 0;
@@ -1159,7 +1160,7 @@ do_squeeze_entry(name_list ** list, char *name, int justify, int num, int denom)
if (!sinfo) {
twmrc_error_prefix();
- fprintf(stderr, "unable to allocate %ld bytes for squeeze info\n",
+ fprintf(stderr, "unable to allocate %lu bytes for squeeze info\n",
(unsigned long) sizeof(SqueezeInfo));
return;
}