Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
env:
RUST_BACKTRACE: 1
- name: cargo test with llvm-cov
run: cargo llvm-cov --target ${{matrix.target}} ${{ matrix.features }} --lcov --output-path lcov.info --ignore-filename-regex "bzip2\.rs|test-libbzip2" --workspace
run: cargo llvm-cov --target ${{matrix.target}} ${{ matrix.features }} --lcov --output-path lcov.info --ignore-filename-regex "test-libbzip2" --workspace
env:
RUST_BACKTRACE: 1
if: matrix.os != 'windows-2022'
Expand Down
10 changes: 6 additions & 4 deletions bzip2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ unsafe fn uncompressStream(zStream: *mut FILE, stream: *mut FILE) -> bool {
} else {
if noisy {
eprintln!(
"{}: {}: trailing garbage after EOF ignored\n",
"\n{}: {}: trailing garbage after EOF ignored\n",
CStr::from_ptr(progName).to_string_lossy(),
CStr::from_ptr(inName.as_ptr()).to_string_lossy(),
);
Expand Down Expand Up @@ -856,13 +856,14 @@ unsafe fn outOfMemory() -> ! {
}

unsafe fn configError() -> ! {
eprint!(concat!(
const MSG: &str = concat!(
"bzip2: I'm not configured correctly for this platform!\n",
"\tI require Int32, Int16 and Char to have sizes\n",
"\tof 4, 2 and 1 bytes to run properly, and they don't.\n",
"\tProbably you can fix this by defining them correctly,\n",
"\tand recompiling. Bye!\n",
));
);
eprint!("{}", MSG);
setExit(3 as libc::c_int);
exit(exitValue);
}
Expand Down Expand Up @@ -1513,12 +1514,13 @@ unsafe fn uncompress(name: Option<String>) {
outStr = stdout;
if inStr.is_null() {
eprintln!(
"{}: Can't open input file {}:{}.",
"{}: Can't open input file {}: {}.",
get_program_name().display(),
in_name.display(),
display_last_os_error(),
);
if !inStr.is_null() {
// this is unreachable, but it exists in the original C source code
fclose(inStr);
}
setExit(1);
Expand Down
Loading