Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:15.1:Update
enscript
enscript-1.6.6-silent-warns.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File enscript-1.6.6-silent-warns.patch of Package enscript
--- afmlib/afmparse.c | 2 +- compat/regex.c | 12 ++++++------ compat/xalloc.c | 6 +++--- src/gsint.h | 2 +- src/main.c | 3 ++- src/psgen.c | 30 ++++++++++++++---------------- src/util.c | 10 ++++++---- states/main.c | 2 +- states/utils.c | 2 +- 9 files changed, 35 insertions(+), 34 deletions(-) --- afmlib/afmparse.c +++ afmlib/afmparse.c 2018-01-23 14:32:29.747373763 +0000 @@ -620,7 +620,7 @@ static void get_key (AFMHandle handle, ParseCtx *ctx, AFMKey *key_return) { int key; - char msg[256]; + char msg[1024+16]; while (1) { --- compat/regex.c +++ compat/regex.c 2018-01-23 14:32:29.751373687 +0000 @@ -2400,11 +2400,12 @@ regex_compile (pattern, size, syntax, bu case ')': if (syntax & RE_NO_BK_PARENS) goto normal_backslash; - if (COMPILE_STACK_EMPTY) + if (COMPILE_STACK_EMPTY) { if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) goto normal_backslash; else FREE_STACK_RETURN (REG_ERPAREN); + } handle_close: if (fixup_alt_jump) @@ -2420,11 +2421,12 @@ regex_compile (pattern, size, syntax, bu } /* See similar code for backslashed left paren above. */ - if (COMPILE_STACK_EMPTY) + if (COMPILE_STACK_EMPTY) { if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) goto normal_char; else FREE_STACK_RETURN (REG_ERPAREN); + } /* Since we just checked for an empty stack above, this ``can't happen''. */ @@ -3106,8 +3108,6 @@ re_compile_fastmap (bufp) char *destination; #endif /* We don't push any register information onto the failure stack. */ - unsigned num_regs = 0; - register char *fastmap = bufp->fastmap; unsigned char *pattern = bufp->buffer; unsigned char *p = pattern; @@ -4801,8 +4801,8 @@ re_match_2_internal (bufp, string1, size register from the stack, since lowest will == highest in `pop_failure_point'. */ active_reg_t dummy_low_reg, dummy_high_reg; - unsigned char *pdummy; - const char *sdummy; + unsigned char *pdummy __attribute__ ((__unused__)); + const char *sdummy __attribute__ ((__unused__)); DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n"); POP_FAILURE_POINT (sdummy, pdummy, --- compat/xalloc.c +++ compat/xalloc.c 2018-01-23 14:32:29.763373456 +0000 @@ -67,7 +67,7 @@ xmalloc (size) ptr = malloc (size); if (ptr == NULL) { - fprintf (stderr, _("xmalloc(): couldn't allocate %d bytes\n"), size); + fprintf (stderr, _("xmalloc(): couldn't allocate %zd bytes\n"), size); exit (1); } @@ -85,7 +85,7 @@ xcalloc (num, size) ptr = calloc (num, size); if (ptr == NULL) { - fprintf (stderr, _("xcalloc(): couldn't allocate %d bytes\n"), size); + fprintf (stderr, _("xcalloc(): couldn't allocate %zd bytes\n"), size); exit (1); } @@ -106,7 +106,7 @@ xrealloc (ptr, size) nptr = realloc (ptr, size); if (nptr == NULL) { - fprintf (stderr, _("xrealloc(): couldn't reallocate %d bytes\n"), size); + fprintf (stderr, _("xrealloc(): couldn't reallocate %zd bytes\n"), size); exit (1); } --- src/gsint.h +++ src/gsint.h 2018-01-23 14:32:29.763373456 +0000 @@ -131,7 +131,7 @@ extern double atan2 ___P ((double, doubl (('0' <= (ch) && (ch) <= '9') || (ch) == '.' || (ch) == '-' || (ch) == '+') /* Return the width of the character <ch> */ -#define CHAR_WIDTH(ch) (font_widths[(unsigned char) (ch)]) +#define FNT_CHAR_WIDTH(ch) (font_widths[(unsigned char) (ch)]) /* Current point y movement from line to line. */ #define LINESKIP (Fpt.h + baselineskip) --- src/main.c +++ src/main.c 2018-01-23 14:32:29.771373302 +0000 @@ -1470,7 +1470,8 @@ name width\theight\tllx\tlly buffer_append (&buffer, enscript_library); buffer_append (&buffer, "/hl/*.st"); - system (buffer_ptr (&buffer)); + if (system (buffer_ptr (&buffer)) < 0) + perror("system"); exit (0); } --- src/psgen.c +++ src/psgen.c 2018-01-23 14:32:29.775373225 +0000 @@ -585,8 +585,8 @@ process_file (char *fname_arg, InputStre * Count possible line number spaces. This should be enought for 99999 * lines */ - linenumber_space = CHAR_WIDTH ('0') * 5 + 1.0; - linenumber_margin = CHAR_WIDTH (':') + CHAR_WIDTH ('m'); + linenumber_space = FNT_CHAR_WIDTH ('0') * 5 + 1.0; + linenumber_margin = FNT_CHAR_WIDTH (':') + FNT_CHAR_WIDTH ('m'); /* We got a new input file. */ input_filenum++; @@ -1137,7 +1137,7 @@ large for page\n"), /* Help macros. */ /* Check if character <ch> fits to current line. */ -#define FITS_ON_LINE(ch) ((linepos + CHAR_WIDTH (ch) < linew) || col == 0) +#define FITS_ON_LINE(ch) ((linepos + FNT_CHAR_WIDTH (ch) < linew) || col == 0) /* Is line buffer empty? */ #define BUFFER_EMPTY() (bufpos == 0) @@ -1160,13 +1160,13 @@ large for page\n"), #define EMIT(ch) \ do { \ APPEND_CHAR (ch); \ - linepos += CHAR_WIDTH (ch); \ + linepos += FNT_CHAR_WIDTH (ch); \ col++; \ } while (0) #define UNEMIT(ch) \ do { \ - linepos -= CHAR_WIDTH (ch); \ + linepos -= FNT_CHAR_WIDTH (ch); \ col--; \ } while (0) @@ -1690,7 +1690,7 @@ get_next_token (InputStream *is, double { /* Proportional font. */ - double grid = tabsize * CHAR_WIDTH (' '); + double grid = tabsize * FNT_CHAR_WIDTH (' '); col++; /* Move linepos to the next multiple of <grid>. */ @@ -1748,9 +1748,9 @@ get_next_token (InputStream *is, double if (ch == bs) { if (BUFFER_EMPTY () || !EXISTS (buffer[bufpos - 1])) - linepos -= CHAR_WIDTH ('m'); + linepos -= FNT_CHAR_WIDTH ('m'); else - linepos -= CHAR_WIDTH (buffer[bufpos - 1]); + linepos -= FNT_CHAR_WIDTH (buffer[bufpos - 1]); done = DONE_DONE; break; @@ -1775,7 +1775,7 @@ get_next_token (InputStream *is, double APPEND_CHAR (buf[i]); /* Update current point counters manually. */ - linepos += CHAR_WIDTH (ch); + linepos += FNT_CHAR_WIDTH (ch); col++; } else if (ch == '(' || ch == ')' || ch == '\\') @@ -1848,7 +1848,7 @@ get_next_token (InputStream *is, double /* Count length. */ for (i = 0; buf[i]; i++) - len += CHAR_WIDTH (buf[i]); + len += FNT_CHAR_WIDTH (buf[i]); if (linepos + len < linew || col == 0) { @@ -2472,7 +2472,7 @@ recognize_eps_file (Token *token) /* No, this BoundingBox comment is corrupted. */ MESSAGE (0, (stderr, _("EPS file \"%s\" contains malformed \ %%%%BoundingBox row:\n\"%.*s\"\n"), - token->u.epsf.filename, strlen (buf) - 1, buf)); + token->u.epsf.filename, (int)(strlen (buf) - 1), buf)); break; } } @@ -2599,7 +2599,7 @@ read_float (InputStream *is, int units, case 'l': /* lines or characters */ if (horizontal) - val *= CHAR_WIDTH ('m'); + val *= FNT_CHAR_WIDTH ('m'); else val *= LINESKIP; break; @@ -2728,7 +2728,7 @@ print_line_number (double x, double y, d int i; char *saved_Fname = ""; FontPoint saved_Fpt; - InputEncoding saved_Fencoding; + InputEncoding saved_Fencoding = 0; saved_Fpt.w = 0.0; saved_Fpt.h = 0.0; @@ -2758,7 +2758,7 @@ print_line_number (double x, double y, d /* Count linenumber string length. */ sprintf (buf, "%d", linenum); for (i = 0; buf[i]; i++) - len += CHAR_WIDTH (buf[i]); + len += FNT_CHAR_WIDTH (buf[i]); /* Print line numbers. */ OUTPUT ((cofp, "%g %g M (%s:) s\n", x + space - len, y, buf)); @@ -2781,8 +2781,6 @@ print_line_number (double x, double y, d * The name of the divert file, shared between divert() and undivert() * functions. */ -static char divertfname[512]; - static void divert () { --- src/util.c +++ src/util.c 2018-01-23 14:32:29.775373225 +0000 @@ -646,7 +646,7 @@ paste_file (char *name, char *suffix) if (j >= sizeof (name) - 1) FATAL ((stderr, _("%s:%d: %%Format: too long name, maxlen=%d"), - buffer_ptr (ctx.fullname), line, sizeof (name) - 1)); + buffer_ptr (ctx.fullname), line, (int)(sizeof (name) - 1))); /* Find the start of the format string. */ for (; buf[i] && isspace (buf[i]); i++) @@ -1387,7 +1387,8 @@ format_user_string (char *context_name, break; case 'c': /* `%c' trailing component of pwd. */ - getcwd (buf, sizeof (buf)); + if (!getcwd (buf, sizeof (buf))) + perror("getcwd"); cp = strrchr (buf, '/'); if (cp) cp++; @@ -1403,7 +1404,8 @@ format_user_string (char *context_name, break; case 'd': /* `%d' current working directory */ - getcwd (buf, sizeof (buf)); + if (!getcwd (buf, sizeof (buf))) + perror("getcwd"); APPEND_STR (buf); break; @@ -1871,7 +1873,7 @@ parse_float (char *string, int units, in case 'l': if (horizontal) - val *= CHAR_WIDTH ('m'); + val *= FNT_CHAR_WIDTH ('m'); else val *= LINESKIP; break; --- states/main.c +++ states/main.c 2018-01-23 14:32:29.775373225 +0000 @@ -371,7 +371,7 @@ main (argc, argv) if (cp) { path = xmalloc (cp - defs_file + 3); - sprintf (path, ".%c%.*s", PATH_SEPARATOR, cp - defs_file, defs_file); + sprintf (path, ".%c%.*s", PATH_SEPARATOR, (int)(cp - defs_file), defs_file); } else path = "."; --- states/utils.c +++ states/utils.c 2018-01-23 14:32:29.775373225 +0000 @@ -833,7 +833,7 @@ eval_expr (expr, env) { Environment *nenv = NULL; ListItem *i, *e; - List *stmts; + List *stmts __attribute__ ((__unused__)); List *lst; Cons *args_locals;
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