From: Nick Bowler Date: Tue, 28 Jan 2014 02:43:42 +0000 (-0500) Subject: liblbx: Fix uninitialized value warning in pipe_seek. X-Git-Url: https://git.draconx.ca/gitweb/liblbx.git/commitdiff_plain/2caeb2fc3c40ecae99f65b791864381fde3015dc liblbx: Fix uninitialized value warning in pipe_seek. 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. --- 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)