mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-15 00:38:15 +00:00
xmlwf/readfilemap.c: Address -Wsign-compare warning
read: http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html
This commit is contained in:
parent
e4f71eeaa0
commit
85bc1329dd
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ filemap(const char *name,
|
|||
{
|
||||
size_t nbytes;
|
||||
int fd;
|
||||
int n;
|
||||
ssize_t n;
|
||||
struct stat sb;
|
||||
void *p;
|
||||
|
||||
|
@ -85,7 +85,7 @@ filemap(const char *name,
|
|||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
if (n != nbytes) {
|
||||
if (n != (ssize_t)nbytes) {
|
||||
fprintf(stderr, "%s: read unexpected number of bytes\n", name);
|
||||
free(p);
|
||||
close(fd);
|
||||
|
|
Loading…
Add table
Reference in a new issue