From 2caeb2fc3c40ecae99f65b791864381fde3015dc Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Mon, 27 Jan 2014 21:43:42 -0500 Subject: [PATCH] liblbx: Fix uninitialized value warning in pipe_seek. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If whence is invalid then we will proceed with an uninitialized value. However, unlike the similar problem in lbx_file_seek, pipe_seek is an internal function so this scenario can Never Happen™. Add an assertion to silence the warning. --- src/fops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fops.c b/src/fops.c index 26b392f..5ae349f 100644 --- a/src/fops.c +++ b/src/fops.c @@ -18,6 +18,7 @@ */ #include #include +#include #include "misc.h" #include "error.h" @@ -87,6 +88,8 @@ static int pipe_seek(void *handle, long offset, int whence) case SEEK_END: distance = -1; break; + default: + assert(0); } if (distance < 0) -- 2.43.0