Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1:ARM:Staging
sc
sc-fix-parentheses.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sc-fix-parentheses.patch of Package sc
Index: sc-7.16/abbrev.c =================================================================== --- sc-7.16.orig/abbrev.c +++ sc-7.16/abbrev.c @@ -91,7 +91,7 @@ add_abbr(char *string) } } - if (expansion == NULL) + if (expansion == NULL) { if ((a = find_abbr(string, strlen(string), &prev))) { error("abbrev \"%s %s\"", a->abbr, a->exp); return; @@ -99,6 +99,7 @@ add_abbr(char *string) error("abreviation \"%s\" doesn't exist", string); return; } + } if (find_abbr(string, strlen(string), &prev)) del_abbr(string); Index: sc-7.16/cmds.c =================================================================== --- sc-7.16.orig/cmds.c +++ sc-7.16/cmds.c @@ -810,9 +810,9 @@ pullcells(int to_insert) if (to_insert == 'r') { insertrow(numrows, 0); - if (fr = find_frange(currow, curcol)) + if ((fr = find_frange(currow, curcol)) != NULL) { deltac = fr->or_left->col - mincol; - else { + } else { for (i = 0; i < numrows; i++) row_hidden[currow+i] = delbuffmt[dbidx][4*numcols+i]; deltac = 0; @@ -2337,8 +2337,8 @@ copye(register struct enode *e, int Rdel break; case 'f': case 'F': - if (range && ret->op == 'F' || - !range && ret->op == 'f') + if ((range && ret->op == 'F') || + (!range && ret->op == 'f')) Rdelta = Cdelta = 0; ret->e.o.left = copye(e->e.o.left, Rdelta, Cdelta, r1, c1, r2, c2, transpose); @@ -2883,13 +2883,14 @@ writefile(char *fname, int r0, int c0, i } #endif /* VMS */ - if (*fname == '\0') + if (*fname == '\0') { if (isatty(STDOUT_FILENO) || *curfile != '\0') fname = curfile; else { write_fd(stdout, r0, c0, rn, cn); return (0); } + } #ifdef MSDOS namelen = 12; Index: sc-7.16/interp.c =================================================================== --- sc-7.16.orig/interp.c +++ sc-7.16/interp.c @@ -2066,7 +2066,7 @@ str_search(char *s, int firstrow, int fi *line = '\0'; } } - if (!col_hidden[c]) + if (!col_hidden[c]) { if (gs.g_type == G_STR) { if (p && p->label #if defined(REGCOMP) @@ -2099,6 +2099,7 @@ str_search(char *s, int firstrow, int fi #endif #endif break; + } if (r == endr && c == endc) { error("String not found"); #if defined(REGCOMP) @@ -2475,7 +2476,7 @@ constant(register struct enode *e) e == NULL || e->op == O_CONST || e->op == O_SCONST - || e->op == 'm' && constant(e->e.o.left) + || (e->op == 'm' && constant(e->e.o.left)) || ( e->op != O_VAR && !(e->op & REDUCE) Index: sc-7.16/lex.c =================================================================== --- sc-7.16.orig/lex.c +++ sc-7.16/lex.c @@ -328,7 +328,7 @@ plugin_exists(char *name, int len, char strcpy((char *)path, HomeDir); strcat((char *)path, "/.sc/plugins/"); strncat((char *)path, name, len); - if (fp = fopen((char *)path, "r")) { + if ((fp = fopen((char *)path, "r")) != NULL) { fclose(fp); return 1; } @@ -336,7 +336,7 @@ plugin_exists(char *name, int len, char strcpy((char *)path, LIBDIR); strcat((char *)path, "/plugins/"); strncat((char *)path, name, len); - if (fp = fopen((char *)path, "r")) { + if ((fp = fopen((char *)path, "r")) != NULL) { fclose(fp); return 1; } Index: sc-7.16/pipe.c =================================================================== --- sc-7.16.orig/pipe.c +++ sc-7.16/pipe.c @@ -36,12 +36,13 @@ getnum(int r0, int c0, int rn, int cn, i for (c = c0, pp = ATBL(tbl, r, c); c <= cn; pp++, c++) { *line = '\0'; p = *pp; - if (p) + if (p) { if (p->cellerror) sprintf(line, "%s", (*pp)->cellerror == CELLERROR ? "ERROR" : "INVALID"); else if (p->flags & is_valid) sprintf(line, "%.15g", p->v); + } if (c < cn) strcat(line, "\t"); else Index: sc-7.16/sc.c =================================================================== --- sc-7.16.orig/sc.c +++ sc-7.16/sc.c @@ -212,7 +212,7 @@ flush_saved() if (dbidx < 0) return; - if (p = delbuf[dbidx]) { + if ((p = delbuf[dbidx]) != NULL) { scxfree(delbuffmt[dbidx]); delbuffmt[dbidx] = NULL; } @@ -845,7 +845,7 @@ main (int argc, char **argv) break; case 'C': color = !color; - if (has_colors()) + if (has_colors()) { if (color) { attron(COLOR_PAIR(1)); bkgd(COLOR_PAIR(1) | ' '); @@ -853,6 +853,7 @@ main (int argc, char **argv) attron(COLOR_PAIR(0)); bkgd(COLOR_PAIR(0) | ' '); } + } error("Color %sabled.", color ? "en" : "dis"); break; case 'N': Index: sc-7.16/screen.c =================================================================== --- sc-7.16.orig/screen.c +++ sc-7.16/screen.c @@ -234,11 +234,12 @@ update(int anychanged) /* did any cell i = stcol; lcols = 0; col = rescol + frcols; - if (fr && stcol >= fr->or_left->col) + if (fr && stcol >= fr->or_left->col) { if (stcol < fr->ir_left->col) i = fr->or_left->col; else col += flcols; + } for (; (col + fwidth[i] < cols-1 || col_hidden[i] || i < curcol) && i < maxcols; i++) { lcols++; @@ -328,11 +329,12 @@ update(int anychanged) /* did any cell i = stcol; lcols = 0; col = rescol + frcols; - if (fr && stcol >= fr->or_left->col) + if (fr && stcol >= fr->or_left->col) { if (stcol < fr->ir_left->col) i = fr->or_left->col; else col += flcols; + } for (; (col + fwidth[i] < cols-1 || col_hidden[i] || i < curcol) && i < maxcols; i++) { lcols++; @@ -377,11 +379,12 @@ update(int anychanged) /* did any cell i = strow; rows = 0; row = RESROW + fbrows; - if (fr && strow >= fr->or_left->row) + if (fr && strow >= fr->or_left->row) { if (strow < fr->ir_left->row) i = fr->or_left->row; else row += ftrows; + } for (; (row < lines || row_hidden[i] || i < currow) && i < maxrows; i++) { rows++; @@ -460,11 +463,12 @@ update(int anychanged) /* did any cell i = strow; rows = 0; row = RESROW + fbrows; - if (fr && strow >= fr->or_left->row) + if (fr && strow >= fr->or_left->row) { if (strow < fr->ir_left->row) i = fr->or_left->row; else row += ftrows; + } for (; (row < lines || row_hidden[i] || i < currow) && i < maxrows; i++) { rows++; Index: sc-7.16/vi.c =================================================================== --- sc-7.16.orig/vi.c +++ sc-7.16/vi.c @@ -669,7 +669,7 @@ dotab() static struct range *nextmatch; int len; - if (linelim > 0 && isalnum(line[linelim-1]) || line[linelim-1] == '_' || + if ((linelim > 0 && isalnum(line[linelim-1])) || line[linelim-1] == '_' || (completethis && line[linelim-1] == ' ')) { if (!completethis) { for (completethis = line + linelim - 1; isalnum(*completethis) ||
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor