Bug 1202971 (part 1) - Fix compile warnings in libmar. r=rstrong.

Also remove ALLOW_COMPILER_WARNINGS=True so they don't come back.
This commit is contained in:
Nicholas Nethercote 2015-09-15 17:39:11 -07:00
parent 785e6ca8ad
commit 21934537ce
6 changed files with 8 additions and 12 deletions

View File

@ -22,6 +22,3 @@ DEFINES['MAR_NSS'] = True
if CONFIG['OS_ARCH'] == 'WINNT':
USE_STATIC_LIBS = True
# XXX: We should fix these warnings.
ALLOW_COMPILER_WARNINGS = True

View File

@ -81,7 +81,10 @@ GetPasswordString(void *arg, char *prompt)
fflush(stdout);
}
QUIET_FGETS (phrase, sizeof(phrase), input);
if (!QUIET_FGETS(phrase, sizeof(phrase), input)) {
fprintf(stderr, "QUIET_FGETS failed\n");
return NULL;
}
if (isInputTerminal) {
fprintf(stdout, "\n");

View File

@ -337,7 +337,7 @@ int get_mar_file_info_fp(FILE *fp,
}
}
if (ftell(fp) == offsetToContent) {
if ((int64_t)ftell(fp) == (int64_t)offsetToContent) {
*hasAdditionalBlocks = 0;
} else {
if (numAdditionalBlocks) {

View File

@ -28,6 +28,3 @@ FORCE_STATIC_LIB = True
if CONFIG['OS_ARCH'] == 'WINNT':
USE_STATIC_LIBS = True
# XXX: We should fix these warnings.
ALLOW_COMPILER_WARNINGS = True

View File

@ -161,7 +161,9 @@ int main(int argc, char **argv) {
break;
/* -C workingdirectory */
} else if (argv[1][0] == '-' && argv[1][1] == 'C') {
chdir(argv[2]);
if (chdir(argv[2]) != 0) {
return -1;
}
argv += 2;
argc -= 2;
}

View File

@ -58,9 +58,6 @@ if CONFIG['HOST_OS_ARCH'] == 'WINNT':
'ws2_32',
]
# XXX: We should fix these warnings.
ALLOW_COMPILER_WARNINGS = True
HOST_DEFINES['NO_SIGN_VERIFY'] = True
if CONFIG['CROSS_COMPILE'] and CONFIG['HOST_NSPR_MDCPUCFG']: