From 803642a8497a681b86a0e8da68befe3e4613cf5c Mon Sep 17 00:00:00 2001 From: Suresh Sundriyal Date: Sat, 21 Mar 2015 15:28:40 -0700 Subject: [PATCH] [Coverity] Fixes an 'Uninitialized variables' error. Initialize retval to SQLITE_ERROR during declaration at the beggining of the method. I could technically go with SQLITE_OK but if this is going to be unintentially returned without being initialized, I would much rather it return an error than success. --- src/environ_vtab.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environ_vtab.cc b/src/environ_vtab.cc index ae170b1c..e382b8ee 100644 --- a/src/environ_vtab.cc +++ b/src/environ_vtab.cc @@ -212,7 +212,7 @@ static int vt_update(sqlite3_vtab *tab, const char *name = ( argc > 2 ? (const char *)sqlite3_value_text(argv[2]) : NULL); vtab *p_vt = (vtab *)tab; - int retval; + int retval = SQLITE_ERROR; if (argc != 1 && (argc < 3 ||