Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
binhdvo committed Dec 3, 2021
1 parent 8f6f26b commit b2caf8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 3 additions & 3 deletions programs/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ FIO_openDstFile(FIO_ctx_t* fCtx, FIO_prefs_t* const prefs,
}
#endif
if (!prefs->overwrite) {
if (g_display_prefs.displayLevel <= 1) {
if (g_display_prefs.displayLevel == 0) {
/* No interaction possible */
DISPLAY("zstd: %s already exists; not overwritten \n",
dstFileName);
Expand Down Expand Up @@ -1870,7 +1870,7 @@ int FIO_compressMultipleFilenames(FIO_ctx_t* const fCtx,
/* init */
assert(outFileName != NULL || suffix != NULL);
if (outFileName != NULL) { /* output into a single destination (stdout typically) */
if (FIO_removeMultiFilesWarning(fCtx, prefs, outFileName, 1 /* displayLevelCutoff */)) {
if (FIO_removeMultiFilesWarning(fCtx, prefs, outFileName, 0 /* displayLevelCutoff */)) {
FIO_freeCResources(&ress);
return 1;
}
Expand Down Expand Up @@ -2810,7 +2810,7 @@ FIO_decompressMultipleFilenames(FIO_ctx_t* const fCtx,
dRess_t ress = FIO_createDResources(prefs, dictFileName);

if (outFileName) {
if (FIO_removeMultiFilesWarning(fCtx, prefs, outFileName, 1 /* displayLevelCutoff */)) {
if (FIO_removeMultiFilesWarning(fCtx, prefs, outFileName, 0 /* displayLevelCutoff */)) {
FIO_freeDResources(ress);
return 1;
}
Expand Down
7 changes: 1 addition & 6 deletions programs/zstdcli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1365,12 +1365,7 @@ int main(int argCount, const char* argv[])
/* No status message in pipe mode (stdin - stdout) */
hasStdout = outFileName && !strcmp(outFileName,stdoutmark);

if (hasStdout && (g_displayLevel==2)) g_displayLevel=1;

/* If stderr is not a TTY, imply -q */
if (!IS_CONSOLE(stderr) && g_displayLevel == DISPLAY_LEVEL_DEFAULT) {
g_displayLevel--;
}
if ((hasStdout || !IS_CONSOLE(stderr)) && (g_displayLevel==2)) g_displayLevel=1;

/* IO Stream/File */
FIO_setHasStdoutOutput(fCtx, hasStdout);
Expand Down

0 comments on commit b2caf8b

Please sign in to comment.