getopt_long() return value does not fit into char

This commit is contained in:
naddy 2018-04-24 19:06:01 +00:00
parent 16e7e4b158
commit 92c785c9a0
4 changed files with 53 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.5 2015/11/24 09:11:03 jasper Exp $
# $OpenBSD: Makefile,v 1.6 2018/04/24 19:06:01 naddy Exp $
COMMENT= tools for handling audio-file cue sheets and toc files
DISTNAME= cuetools-1.3.1
REVISION= 1
REVISION= 2
CATEGORIES= audio textproc

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_tools_cuebreakpoints_c,v 1.1 2018/04/24 19:06:01 naddy Exp $
Index: src/tools/cuebreakpoints.c
--- src/tools/cuebreakpoints.c.orig
+++ src/tools/cuebreakpoints.c
@@ -106,7 +106,7 @@ int main (int argc, char **argv)
int gaps = APPEND;
/* option variables */
- char c;
+ int c;
/* getopt_long() variables */
extern char *optarg;
extern int optind;

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_tools_cueconvert_c,v 1.1 2018/04/24 19:06:01 naddy Exp $
Index: src/tools/cueconvert.c
--- src/tools/cueconvert.c.orig
+++ src/tools/cueconvert.c
@@ -63,7 +63,7 @@ int main (int argc, char **argv)
int iformat = UNKNOWN;
int oformat = UNKNOWN;
/* option variables */
- char c;
+ int c;
/* getopt_long() variables */
extern char *optarg;
extern int optind;

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-src_tools_cueprint_c,v 1.1 2018/04/24 19:06:01 naddy Exp $
Index: src/tools/cueprint.c
--- src/tools/cueprint.c.orig
+++ src/tools/cueprint.c
@@ -266,7 +266,7 @@ void print_conv (char *start, int length, Cd *cd, int
printf(conv, value.sval);
break;
default:
- printf("%d: ", strlen(conv));
+ printf("%zd: ", strlen(conv));
printf("%s", conv);
}
@@ -424,7 +424,7 @@ int main (int argc, char **argv)
char *d_template = NULL; /* disc template */
char *t_template = NULL; /* track template */
/* getopt_long() variables */
- char c;
+ int c;
extern char *optarg;
extern int optind;