[-Wunused-but-set-variable] (clang) - remove

This commit is contained in:
Richard Cohen 2023-02-13 16:48:42 +00:00
parent dda1bb8374
commit f63dddcc84
6 changed files with 2 additions and 26 deletions

View File

@ -1184,7 +1184,6 @@ build_tuples( state *s, ub2 d, ub2 f)
feature offset[MAX_N]; /* n-1-tuples */
feature tuple[MAX_N]; /* n-tuples that include (d,f) */
sb4 i, j, n;
ub8 count = 0;
tu_iter ctx;
if (s->tc[d][f] > 0 || s->n[d][f] == s->n_final) {
@ -1242,7 +1241,6 @@ build_tuples( state *s, ub2 d, ub2 f)
printf("jenny: could not insert tuple\n");
return;
}
++count;
/* next tuple */
make_next_tuple:

View File

@ -808,7 +808,6 @@ gnc_query_view_fill (GNCQueryView *qview)
for (item = entries; item; item = item->next)
{
GList *node;
gint row = 0;
const QofParam *gup;
QofParam *qp = NULL;
@ -868,7 +867,6 @@ gnc_query_view_fill (GNCQueryView *qview)
}
i++;
}
row++;
/* and set a watcher on this item */
gup = priv->get_guid;
guid = (const GncGUID*)((gup->param_getfcn)(item->data, gup));

View File

@ -1221,24 +1221,12 @@ gnc_tree_view_account_get_view_info (GncTreeViewAccount *account_view,
/*
* Set the account view info data in use by the specified tree to
* match the callers request.
*
* DRH - COMPATIBILITY WARNING
*
* This function does not do anything with the 'include_type' field.
* Should there be a automatic filter for backward compatibility
* that uses these flags, or should all uses of this be converted to
* a GtkTreeModelFilter?
*
* CAS - For now, I'll try the automatic filter approach by making
* this function use GtkTreeModelFilter.
*/
void
gnc_tree_view_account_set_view_info (GncTreeViewAccount *account_view,
AccountViewInfo *avi)
{
GncTreeViewAccountPrivate *priv;
gint i;
guint sel_bits = 0;
ENTER("%p", account_view);
g_return_if_fail(GNC_IS_TREE_VIEW_ACCOUNT(account_view));
@ -1247,11 +1235,6 @@ gnc_tree_view_account_set_view_info (GncTreeViewAccount *account_view,
priv = GNC_TREE_VIEW_ACCOUNT_GET_PRIVATE(account_view);
priv->avi = *avi;
for (i = 0; i < NUM_ACCOUNT_TYPES; i++)
{
sel_bits |= avi->include_type[i] ? (1 << i) : 0;
}
gnc_tree_view_account_set_filter(
account_view, gnc_tree_view_account_filter_by_view_info,
&priv->avi, NULL);

View File

@ -154,7 +154,7 @@ gnc_default_invoice_report_combo (const char* guid_scm_function)
if (scm_is_list (rpt_guids))
{
for (int i = 0; !scm_is_null (rpt_guids); i++)
while (!scm_is_null (rpt_guids))
{
gchar *guid_str = scm_to_utf8_string (SCM_CAR(rpt_guids));
gchar *name = gnc_scm_to_utf8_string (scm_call_2(template_menu_name,

View File

@ -155,7 +155,6 @@ update_report_list(GtkListStore *store, CustomReportDialog *crd)
SCM get_rpt_guids = scm_c_eval_string("gnc:custom-report-template-guids");
SCM template_menu_name = scm_c_eval_string("gnc:report-template-menu-name/report-guid");
SCM rpt_guids;
int i;
GtkTreeIter iter;
GtkTreeModel *model = GTK_TREE_MODEL (store);
@ -170,7 +169,7 @@ update_report_list(GtkListStore *store, CustomReportDialog *crd)
{
/* for all the report guids in the list, store them, with a reference,
in the gtkliststore */
for (i = 0; !scm_is_null(rpt_guids); i++)
while ( !scm_is_null(rpt_guids) )
{
GncGUID *guid = guid_malloc ();
gchar *guid_str = scm_to_utf8_string (SCM_CAR(rpt_guids));

View File

@ -365,7 +365,6 @@ static void process_trans_record( FILE *log_file)
const char * record_end_str = "===== END";
int first_record = TRUE;
int record_ended = FALSE;
int split_num = 0;
split_record record;
Transaction * trans = NULL;
Split * split = NULL;
@ -380,7 +379,6 @@ static void process_trans_record( FILE *log_file)
if (read_retval != NULL &&
strncmp(record_end_str, read_buf, strlen(record_end_str)) != 0) /* If we are not at the end of the record */
{
split_num++;
/*DEBUG("process_trans_record(): Line read: %s%s",read_buf ,"\n");*/
record = interpret_split_record(g_strchomp(read_buf));