diff --git a/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp b/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp index 995b44a8c183..ef5d2d9f61ad 100644 --- a/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp +++ b/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp @@ -138,7 +138,7 @@ XPTHeader *getHeader(const char *filename, nsIAllocator *al) { } if (flen > 0) { - PRUint32 howmany = PR_Read(in, whole, flen); + PRInt32 howmany = PR_Read(in, whole, flen); if (howmany < 0) { NS_ERROR("FAILED: reading typelib file"); goto out; diff --git a/xpcom/typelib/xpt/tools/xpt_dump.c b/xpcom/typelib/xpt/tools/xpt_dump.c index 6749de77d825..d0476416e45c 100644 --- a/xpcom/typelib/xpt/tools/xpt_dump.c +++ b/xpcom/typelib/xpt/tools/xpt_dump.c @@ -214,10 +214,6 @@ main(int argc, char **argv) if (flen > 0) { size_t rv = fread(whole, 1, flen, in); - if (rv < 0) { - perror("FAILED: reading typelib file"); - return 1; - } if (rv < flen) { fprintf(stderr, "short read (%d vs %d)! ouch!\n", rv, flen); return 1; diff --git a/xpcom/typelib/xpt/tools/xpt_link.c b/xpcom/typelib/xpt/tools/xpt_link.c index 08c2f8582522..3c78668df727 100644 --- a/xpcom/typelib/xpt/tools/xpt_link.c +++ b/xpcom/typelib/xpt/tools/xpt_link.c @@ -145,10 +145,6 @@ main(int argc, char **argv) if (flen > 0) { size_t rv = fread(whole, 1, flen, in); - if (rv < 0) { - perror("FAILED: reading typelib file"); - return 1; - } if (rv < flen) { fprintf(stderr, "short read (%d vs %d)! ouch!\n", rv, flen); return 1;