[balsa/gtk3] Various cppcheck fixes
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Various cppcheck fixes
- Date: Sun, 22 Jul 2012 19:44:32 +0000 (UTC)
commit 06c6ea2e93d236bcd5e656bd32be242ca29c7e30
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Jul 22 15:41:40 2012 -0400
Various cppcheck fixes
* src/sendmsg-window.c (update_bsmsg_identity): reduce scope of
variables;
(tree_add_quote_body): suppress null pointer warning.
ChangeLog | 6 ++++++
src/sendmsg-window.c | 4 +++-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6f29b20..6422405 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-07-22 Peter Bloomfield
+ * src/sendmsg-window.c (update_bsmsg_identity): reduce scope of
+ variables;
+ (tree_add_quote_body): suppress null pointer warning.
+
+2012-07-22 Peter Bloomfield
+
* src/save-restore.c (pop3_progress_notify): suppress memory
leak warning.
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index 7860396..f90ad91 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -1469,7 +1469,6 @@ update_bsmsg_identity(BalsaSendmsg* bsmsg, LibBalsaIdentity* ident)
if (bsmsg->ident->bcc) {
InternetAddressList *bcc_list, *ident_list;
- int i, j;
bcc_list =
libbalsa_address_view_get_list(bsmsg->recipient_view, "Bcc:");
@@ -1479,10 +1478,12 @@ update_bsmsg_identity(BalsaSendmsg* bsmsg, LibBalsaIdentity* ident)
/* Remove any Bcc addresses that came from the old identity
* from the list. */
gint ident_list_len = internet_address_list_length(ident_list);
+ gint i;
for (i = 0; i < internet_address_list_length(bcc_list); i++) {
InternetAddress *ia =
internet_address_list_get_address (bcc_list, i);
+ gint j;
for (j = 0; j < ident_list_len; j++) {
InternetAddress *ia2 =
@@ -3420,6 +3421,7 @@ tree_add_quote_body(LibBalsaMessageBody * body, GtkTreeStore * store, GtkTreeIte
disp_type = g_mime_object_get_disposition(body->mime_part);
else
disp_type = NULL;
+ /* cppcheck-suppress nullPointer */
preselect = !disp_type || *disp_type == '\0' ||
!g_ascii_strcasecmp(disp_type, "inline");
if (body->filename && *body->filename) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]