[PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-07 Thread Mark Walters
Hello I do not get the failure with just 1/4 applied but do with all 4 applied. The trivial patch below fixes it, but it might not be the best solution. The failure occurs because Jani's patch changes the behavior of a couple of emacs/notmuch internal functions: the function notmuch-search-reply

[PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-07 Thread Jani Nikula
On Jan 7, 2012 5:52 AM, "David Bremner" wrote: > > On Thu, 5 Jan 2012 22:25:12 +0200, Jani Nikula wrote: > > notmuch_show_params_t params is only initialized partially in > > notmuch_reply_command(). The only field that is used uninitialized is > > params.decrypt. It is usually non-zero, making

[PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-07 Thread David Bremner
On Sat, 7 Jan 2012 09:31:35 +0200, Jani Nikula wrote: > On Jan 7, 2012 5:52 AM, "David Bremner" wrote: > > > > On Thu, 5 Jan 2012 22:25:12 +0200, Jani Nikula wrote: > > > notmuch_show_params_t params is only initialized partially in > > > notmuch_reply_command(). The only field that is used uni

Re: [PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-07 Thread David Bremner
On Sat, 7 Jan 2012 09:31:35 +0200, Jani Nikula wrote: > On Jan 7, 2012 5:52 AM, "David Bremner" wrote: > > > > On Thu, 5 Jan 2012 22:25:12 +0200, Jani Nikula wrote: > > > notmuch_show_params_t params is only initialized partially in > > > notmuch_reply_command(). The only field that is used uni

Re: [PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-07 Thread Mark Walters
Hello I do not get the failure with just 1/4 applied but do with all 4 applied. The trivial patch below fixes it, but it might not be the best solution. The failure occurs because Jani's patch changes the behavior of a couple of emacs/notmuch internal functions: the function notmuch-search-reply

[PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-06 Thread David Bremner
On Thu, 5 Jan 2012 22:25:12 +0200, Jani Nikula wrote: > notmuch_show_params_t params is only initialized partially in > notmuch_reply_command(). The only field that is used uninitialized is > params.decrypt. It is usually non-zero, making "notmuch reply" on encrypted > messages work by coincidenc

Re: [PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-06 Thread Jani Nikula
On Jan 7, 2012 5:52 AM, "David Bremner" wrote: > > On Thu, 5 Jan 2012 22:25:12 +0200, Jani Nikula wrote: > > notmuch_show_params_t params is only initialized partially in > > notmuch_reply_command(). The only field that is used uninitialized is > > params.decrypt. It is usually non-zero, making

Re: [PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-06 Thread David Bremner
On Thu, 5 Jan 2012 22:25:12 +0200, Jani Nikula wrote: > notmuch_show_params_t params is only initialized partially in > notmuch_reply_command(). The only field that is used uninitialized is > params.decrypt. It is usually non-zero, making "notmuch reply" on encrypted > messages work by coincidenc

[PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-06 Thread Jani Nikula
On Thu, 05 Jan 2012 23:22:34 -0400, David Bremner wrote: > On Thu, 5 Jan 2012 22:25:12 +0200, Jani Nikula wrote: > > -notmuch_show_params_t params; > > +notmuch_show_params_t params = { .part = -1 }; > > > > reply_format_func = notmuch_reply_format_default; > > -params.part =

[PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-06 Thread David Bremner
On Fri, 06 Jan 2012 10:11:42 +0200, Jani Nikula wrote: > IMHO the first is cleanest and unaffected by changes in > notmuch_show_params_t, though might be surprising if you're not (yet) > used to C99 designated initializers. Obviously not ;). It would nice to have a consensus about the use of C99

Re: [PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-06 Thread David Bremner
On Fri, 06 Jan 2012 10:11:42 +0200, Jani Nikula wrote: > IMHO the first is cleanest and unaffected by changes in > notmuch_show_params_t, though might be surprising if you're not (yet) > used to C99 designated initializers. Obviously not ;). It would nice to have a consensus about the use of C99

Re: [PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-06 Thread Jani Nikula
On Thu, 05 Jan 2012 23:22:34 -0400, David Bremner wrote: > On Thu, 5 Jan 2012 22:25:12 +0200, Jani Nikula wrote: > > -notmuch_show_params_t params; > > +notmuch_show_params_t params = { .part = -1 }; > > > > reply_format_func = notmuch_reply_format_default; > > -params.part =

[PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-05 Thread David Bremner
On Thu, 5 Jan 2012 22:25:12 +0200, Jani Nikula wrote: > -notmuch_show_params_t params; > +notmuch_show_params_t params = { .part = -1 }; > > reply_format_func = notmuch_reply_format_default; > -params.part = -1; Do I understand correctly that this is just a style change, or do

[PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-05 Thread Jani Nikula
notmuch_show_params_t params is only initialized partially in notmuch_reply_command(). The only field that is used uninitialized is params.decrypt. It is usually non-zero, making "notmuch reply" on encrypted messages work by coincidence. Initialize params properly, and set params.decrypt as needed

Re: [PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-05 Thread David Bremner
On Thu, 5 Jan 2012 22:25:12 +0200, Jani Nikula wrote: > -notmuch_show_params_t params; > +notmuch_show_params_t params = { .part = -1 }; > > reply_format_func = notmuch_reply_format_default; > -params.part = -1; Do I understand correctly that this is just a style change, or do

[PATCH 1/4] cli: fix use of uninitialized variable in "notmuch reply"

2012-01-05 Thread Jani Nikula
notmuch_show_params_t params is only initialized partially in notmuch_reply_command(). The only field that is used uninitialized is params.decrypt. It is usually non-zero, making "notmuch reply" on encrypted messages work by coincidence. Initialize params properly, and set params.decrypt as needed