summaryrefslogtreecommitdiffstats
path: root/sys-utils/dmesg.c
diff options
context:
space:
mode:
authorKarel Zak2017-11-28 10:45:06 +0100
committerKarel Zak2017-11-28 10:45:06 +0100
commitaec01d7211ee58948c6dbfb376ff52f0c9981ccf (patch)
tree2ffd14bc71375b2f8fa1d457b6721d21c90e0c2f /sys-utils/dmesg.c
parentbuild-sys: lsns requires libmount (diff)
downloadkernel-qcow2-util-linux-aec01d7211ee58948c6dbfb376ff52f0c9981ccf.tar.gz
kernel-qcow2-util-linux-aec01d7211ee58948c6dbfb376ff52f0c9981ccf.tar.xz
kernel-qcow2-util-linux-aec01d7211ee58948c6dbfb376ff52f0c9981ccf.zip
dmesg: fix compiler warning [-Wuninitialized]
sys-utils/dmesg.c: In function ‘print_record.constprop.12’: sys-utils/dmesg.c:1039:14: warning: ‘mesg_size’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/dmesg.c')
-rw-r--r--sys-utils/dmesg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index bdd50b474..ad47ac44d 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -883,7 +883,7 @@ static void print_record(struct dmesg_control *ctl,
char buf[128];
char fpbuf[32] = "\0";
char tsbuf[64] = "\0";
- size_t mesg_size;
+ size_t mesg_size = rec->mesg_size;
int timebreak = 0;
char *mesg_copy = NULL;
const char *line = NULL;