Skip to content

Commit

Permalink
Silence an apparent false positive warning from gcc in -Og mode
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pmatilai committed May 11, 2023
1 parent ae1b8c8 commit 93ee7d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/backend/sqlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 93ee7d9

Please sign in to comment.