From 93ee7d9c6164467608094a7e0652a0e3d84a6715 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 11 May 2023 09:27:12 +0300 Subject: Silence an apparent false positive warning from gcc in -Og mode Haven't looked at the assembler but I don't see how xx could be uninitialized by the time it gets to the if(), regardless of the optimization used. --- lib/backend/sqlite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backend/sqlite.c b/lib/backend/sqlite.c index d5389736b..5a029d575 100644 --- a/lib/backend/sqlite.c +++ b/lib/backend/sqlite.c @@ -135,7 +135,7 @@ static int sqlite_init(rpmdb rdb, const char * dbhome) if (rdb->db_dbenv == NULL) { dbfile = rpmGenPath(dbhome, rdb->db_ops->path, NULL); sqlite3 *sdb = NULL; - int xx, flags = 0; + int xx = SQLITE_CANTOPEN, flags = 0; int retry_open = 1; if ((rdb->db_mode & O_ACCMODE) == O_RDONLY) flags |= SQLITE_OPEN_READONLY; -- cgit v1.2.1