summaryrefslogtreecommitdiff
path: root/soltools
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-10-09 17:01:14 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-10-09 17:25:29 +0200
commitf0eb45df5e3f59991102b2228a62d15baa397b59 (patch)
treeab62884be5f6ad7ecc4dfb1b0a27641a91e5e3a3 /soltools
parent7c4d3ea6ba4d42b4dda5148a00c8c411b5d7703d (diff)
fix some lousy formatting that triggers warnings from the compiler plugin
Change-Id: I94cafba5363f24d608add6878c72f230f45fdb87
Diffstat (limited to 'soltools')
-rw-r--r--soltools/cpp/_macro.c2
-rw-r--r--soltools/mkdepend/cppsetup.c8
-rw-r--r--soltools/mkdepend/ifparser.c8
-rw-r--r--soltools/mkdepend/main.c28
-rw-r--r--soltools/mkdepend/parse.c14
5 files changed, 29 insertions, 31 deletions
diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c
index 7490597a608b..251a1f63dfff 100644
--- a/soltools/cpp/_macro.c
+++ b/soltools/cpp/_macro.c
@@ -664,7 +664,7 @@ Tokenrow *
// Change by np 31.10.2001, #93725 - begin
if ( tp->wslen > 0 )
- *sp++ = ' ';
+ *sp++ = ' ';
// change end.
for (i = 0, cp = tp->t; (unsigned int)i < tp->len; i++)
diff --git a/soltools/mkdepend/cppsetup.c b/soltools/mkdepend/cppsetup.c
index 6a4d2b8cf68a..f4cdaa55eeb1 100644
--- a/soltools/mkdepend/cppsetup.c
+++ b/soltools/mkdepend/cppsetup.c
@@ -161,7 +161,7 @@ _lookup_variable (var, len)
char tmpbuf[MAXNAMELEN + 1];
if (len > MAXNAMELEN)
- return 0;
+ return 0;
strncpy (tmpbuf, var, len);
tmpbuf[len] = '\0';
@@ -177,9 +177,9 @@ _my_eval_defined (ip, var, len)
{
(void)ip;
if (_lookup_variable (var, len))
- return 1;
+ return 1;
else
- return 0;
+ return 0;
}
#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
@@ -196,7 +196,7 @@ _my_eval_variable (ip, var, len)
s = _lookup_variable (var, len);
if (!s)
- return 0;
+ return 0;
do {
var = s;
if (!isvarfirstletter(*var))
diff --git a/soltools/mkdepend/ifparser.c b/soltools/mkdepend/ifparser.c
index abfb92c9e48a..6518b1e5a974 100644
--- a/soltools/mkdepend/ifparser.c
+++ b/soltools/mkdepend/ifparser.c
@@ -82,7 +82,7 @@ parse_variable (g, cp, varp)
SKIPSPACE (cp);
if (!isvarfirstletter (*cp))
- return CALLFUNC(g, handle_error) (g, cp, "variable name");
+ return CALLFUNC(g, handle_error) (g, cp, "variable name");
*varp = cp;
/* EMPTY */
@@ -100,7 +100,7 @@ parse_number (g, cp, valp)
SKIPSPACE (cp);
if (!isdigit(*cp))
- return CALLFUNC(g, handle_error) (g, cp, "number");
+ return CALLFUNC(g, handle_error) (g, cp, "number");
#ifdef WIN32
{
@@ -128,7 +128,7 @@ parse_value (g, cp, valp)
SKIPSPACE (cp);
if (!*cp)
- return cp;
+ return cp;
switch (*cp) {
case '(':
@@ -178,7 +178,7 @@ parse_value (g, cp, valp)
len = (int)(cp - var);
SKIPSPACE (cp);
if (paren && *cp != ')')
- return CALLFUNC(g, handle_error) (g, cp, ")");
+ return CALLFUNC(g, handle_error) (g, cp, ")");
*valp = (*(g->funcs.eval_defined)) (g, var, len);
return cp + paren; /* skip the right paren */
}
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index f9dc0f764ebd..5beb8fdf981e 100644
--- a/soltools/mkdepend/main.c
+++ b/soltools/mkdepend/main.c
@@ -195,18 +195,18 @@ int main(argc, argv)
nargc = 1;
if ((afd = open(argv[1]+1, O_RDONLY)) < 0)
- fatalerr("cannot open \"%s\"\n", argv[1]+1);
+ fatalerr("cannot open \"%s\"\n", argv[1]+1);
fstat(afd, &ast);
args = (char *)malloc(ast.st_size + 1);
if ((ast.st_size = read(afd, args, (size_t) ast.st_size)) < 0)
- fatalerr("failed to read %s\n", argv[1]+1);
+ fatalerr("failed to read %s\n", argv[1]+1);
args[ast.st_size] = '\0';
close(afd);
for (p = args; *p; p++) {
if (quotechar) {
- if (quotechar == '\\' ||
- (*p == quotechar && p[-1] != '\\'))
- quotechar = '\0';
+ if (quotechar == '\\'
+ || (*p == quotechar && p[-1] != '\\'))
+ quotechar = '\0';
continue;
}
switch (*p) {
@@ -219,18 +219,18 @@ int main(argc, argv)
case '\n':
*p = '\0';
if (p > args && p[-1])
- nargc++;
+ nargc++;
break;
}
}
if (p[-1])
- nargc++;
+ nargc++;
nargv = (char **)malloc(nargc * sizeof(char *));
nargv[0] = argv[0];
argc = 1;
for (p = args; argc < nargc; p += strlen(p) + 1)
- if (*p) nargv[argc++] = p;
- argv = nargv;
+ if (*p) nargv[argc++] = p;
+ argv = nargv;
}
for(argc--, argv++; argc; argc--, argv++) {
/* if looking for endmarker then check before parsing */
@@ -364,16 +364,16 @@ int main(argc, argv)
*incp++ = PREINCDIR;
#endif
if (incp >= includedirs + MAXDIRS)
- fatalerr("Too many -I flags.\n");
+ fatalerr("Too many -I flags.\n");
*incp++ = INCLUDEDIR;
#ifdef POSTINCDIR
if (incp >= includedirs + MAXDIRS)
- fatalerr("Too many -I flags.\n");
+ fatalerr("Too many -I flags.\n");
*incp++ = POSTINCDIR;
#endif
} else if (*defincdir) {
if (incp >= includedirs + MAXDIRS)
- fatalerr("Too many -I flags.\n");
+ fatalerr("Too many -I flags.\n");
*incp++ = defincdir;
}
@@ -709,8 +709,8 @@ void redirect(line, makefile)
}
if (!found) {
if (verbose)
- warning("Adding new delimiting line \"%s\" and dependencies...\n",
- line);
+ warning("Adding new delimiting line \"%s\" and dependencies...\n",
+ line);
puts(line); /* same as fputs(fdout); but with newline */
} else if (append) {
while (fgets(buf, BUFSIZ, fdin)) {
diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c
index 939155aa3b83..0914fbc57ede 100644
--- a/soltools/mkdepend/parse.c
+++ b/soltools/mkdepend/parse.c
@@ -70,11 +70,9 @@ int find_includes(struct filepointer *filep, struct inclist *file, struct inclis
if (type == ELSE)
find_includes(filep, file,
file_red, recursion+1, recfailOK, incCollection, symbols);
- else
- if (type == ELIF)
+ else if (type == ELIF)
goto doif;
- else
- if ((type == ELIFFALSE) || (type == ELIFGUESSFALSE))
+ else if ((type == ELIFFALSE) || (type == ELIFGUESSFALSE))
goto doiffalse;
break;
case IFDEF:
@@ -398,14 +396,14 @@ void define( def, symbols )
/* Separate symbol name and its value */
val = def;
while (isalnum(*val) || *val == '_')
- val++;
+ val++;
if (*val)
- *val++ = '\0';
+ *val++ = '\0';
while (*val == ' ' || *val == '\t')
- val++;
+ val++;
if (!*val)
- val = "1";
+ val = "1";
hash_define( def, val, symbols );
}