Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

less annoying #33

Merged
merged 5 commits into from
Nov 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/update.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
{
msg(INFO, "fetching updates");

sqlite3_stmt *stmt;

Check warning on line 20 in src/update.c

View workflow job for this annotation

GitHub Actions / c-linter

/src/update.c:20:19 [cppcoreguidelines-init-variables]

variable 'stmt' is not initialized
char *zErrMsg = 0;
int rc;

Check warning on line 22 in src/update.c

View workflow job for this annotation

GitHub Actions / c-linter

/src/update.c:22:9 [cppcoreguidelines-init-variables]

variable 'rc' is not initialized
int new_version_found = 0;

// Prepare the SQL query
Expand All @@ -37,7 +37,7 @@
struct package* remote = calloc(1, sizeof(struct package));
local->name = (char*)sqlite3_column_text(stmt, 0);
local->version = (char*)sqlite3_column_text(stmt, 1);
msg(ERROR, "don't ask why this is here");
dbg(1, "don't ask why this is here");
remote->name = local->name;
retrieve_data_repo(ALL_DB, remote, NULL, NULL);
if(remote->version == NULL)
Expand Down Expand Up @@ -78,9 +78,9 @@
{
msg(INFO, "upgrading");

sqlite3_stmt *stmt;

Check warning on line 81 in src/update.c

View workflow job for this annotation

GitHub Actions / c-linter

/src/update.c:81:19 [cppcoreguidelines-init-variables]

variable 'stmt' is not initialized
char *zErrMsg = 0;
int rc;

Check warning on line 83 in src/update.c

View workflow job for this annotation

GitHub Actions / c-linter

/src/update.c:83:9 [cppcoreguidelines-init-variables]

variable 'rc' is not initialized
int new_version_installed = 0;

// Prepare the SQL query
Expand All @@ -98,7 +98,7 @@
struct package* remote = calloc(1, sizeof(struct package));
local->name = (char*)sqlite3_column_text(stmt, 0);
local->version = (char*)sqlite3_column_text(stmt, 1);
msg(ERROR, "don't ask why this is here");
dbg(1, "don't ask why this is here");
remote->name = local->name;
retrieve_data_repo(ALL_DB, remote, NULL, NULL);
if(remote->version == NULL)
Expand Down
Loading