lastz: cast from char to signed char (#15263)

This commit is contained in:
noguchi-k 2020-03-02 10:58:27 +09:00 committed by GitHub
parent ac4d0c3af7
commit 27de7a2726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,70 @@
--- spack-src/src/sequences.c.org 2020-02-27 16:51:13.380985769 +0900
+++ spack-src/src/sequences.c 2020-02-27 16:55:38.641465062 +0900
@@ -5086,14 +5086,14 @@
// find the next header
ch = seq_getc (_seq);
- if (ch == EOF) goto failure;
+ if ((signed char)ch == EOF) goto failure;
if ((allowComments) && (ch == '#'))
{ // comment, skip to end-of-line and go back and try again
while (ch != '\n')
{
ch = seq_getc (_seq);
- if (ch == EOF) goto failure;
+ if ((signed char)ch == EOF) goto failure;
}
continue;
}
@@ -5117,12 +5117,12 @@
leadingWhite = 0;
ch = seq_getc (_seq);
- if (ch == EOF) goto failure;
+ if ((signed char)ch == EOF) goto failure;
while ((ch != '\n') && (isspace (ch)))
{
leadingWhite++;
ch = seq_getc (_seq);
- if (ch == EOF) goto failure;
+ if ((signed char)ch == EOF) goto failure;
}
if (ch == '\n')
@@ -5137,7 +5137,7 @@
break; // .. truncate the header)
*(s++) = ch;
ch = seq_getc (_seq);
- if (ch == EOF) goto failure;
+ if ((signed char)ch == EOF) goto failure;
}
*s = 0;
@@ -5231,7 +5231,7 @@
debugNamesFile_14;
ch = seq_getc (_seq);
- if (ch == EOF) goto failure;
+ if ((signed char)ch == EOF) goto failure;
if (ch != '@')
suicidef ("internal error in find_next_fastq_coi\n"
@@ -5241,7 +5241,7 @@
// read the header
ch = seq_getc (_seq);
- if (ch == EOF) goto failure;
+ if ((signed char)ch == EOF) goto failure;
s = buffer;
while ((ch != '\n') && (ch != '\r'))
@@ -5250,7 +5250,7 @@
break; // .. truncate the header)
*(s++) = ch;
ch = seq_getc (_seq);
- if (ch == EOF) goto failure;
+ if ((signed char)ch == EOF) goto failure;
}
*s = 0;

View File

@ -14,5 +14,8 @@ class Lastz(MakefilePackage):
version('1.04.00', sha256='a4c2c7a77430387e96dbc9f5bdc75874334c672be90f5720956c0f211abf9f5a')
# cast from char to signed char
patch('cast_signed_char.patch')
def install(self, spec, prefix):
make('install', 'LASTZ_INSTALL={0}'.format(prefix.bin))