mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 12:13:33 +08:00
Merge pull request #2773 from eliasp/type-warnings
Use `PRIu64` to print `uint64_t` in log msgs
This commit is contained in:
commit
114761866a
@ -17,6 +17,7 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
@ -498,7 +499,7 @@ int compress_stream_lz4(int fdf, int fdt, uint64_t max_bytes) {
|
||||
total_out += n;
|
||||
|
||||
if (max_bytes != (uint64_t) -1 && total_out > (size_t) max_bytes) {
|
||||
log_debug("Compressed stream longer than %zd bytes", max_bytes);
|
||||
log_debug("Compressed stream longer than %"PRIu64" bytes", max_bytes);
|
||||
return -EFBIG;
|
||||
}
|
||||
|
||||
@ -649,7 +650,7 @@ int decompress_stream_lz4(int in, int out, uint64_t max_bytes) {
|
||||
total_out += produced;
|
||||
|
||||
if (max_bytes != (uint64_t) -1 && total_out > (size_t) max_bytes) {
|
||||
log_debug("Decompressed stream longer than %zd bytes", max_bytes);
|
||||
log_debug("Decompressed stream longer than %"PRIu64" bytes", max_bytes);
|
||||
r = -EFBIG;
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <linux/magic.h>
|
||||
#include <poll.h>
|
||||
#include <stddef.h>
|
||||
@ -1957,7 +1958,7 @@ _public_ int sd_journal_get_data(sd_journal *j, const char *field, const void **
|
||||
&f->compress_buffer, &f->compress_buffer_size,
|
||||
field, field_length, '=');
|
||||
if (r < 0)
|
||||
log_debug_errno(r, "Cannot decompress %s object of length %zu at offset "OFSfmt": %m",
|
||||
log_debug_errno(r, "Cannot decompress %s object of length %"PRIu64" at offset "OFSfmt": %m",
|
||||
object_compressed_to_string(compression), l, p);
|
||||
else if (r > 0) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user