Revision 3238

View differences:

src/quote_fmt_parse.y
266 266
	| SHOW_MESSAGE
267 267
	{
268 268
		gchar buf[BUFFSIZE];
269
		FILE *fp;
269
		FILE *fp = NULL;
270 270

  
271 271
		if (body)
272 272
			fp = str_open_as_stream(body);
273
		else
273
		else if (msginfo->size > 0) {
274 274
			fp = procmime_get_first_text_content(msginfo, NULL);
275
			if (fp == NULL)
276
				g_warning("quote_fmt_parse.y: Can't get text part\n");
277
		}
275 278

  
276
		if (fp == NULL)
277
			g_warning("Can't get text part\n");
278
		else {
279
		if (fp) {
279 280
			while (fgets(buf, sizeof(buf), fp) != NULL) {
280 281
				strcrchomp(buf);
281 282
				INSERT(buf);
......
286 287
	| SHOW_QUOTED_MESSAGE
287 288
	{
288 289
		gchar buf[BUFFSIZE];
289
		FILE *fp;
290
		FILE *fp = NULL;
290 291

  
291 292
		if (body)
292 293
			fp = str_open_as_stream(body);
293
		else
294
		else if (msginfo->size > 0) {
294 295
			fp = procmime_get_first_text_content(msginfo, NULL);
296
			if (fp == NULL)
297
				g_warning("quote_fmt_parse.y: Can't get text part\n");
298
		}
295 299

  
296
		if (fp == NULL)
297
			g_warning("Can't get text part\n");
298
		else {
300
		if (fp) {
299 301
			while (fgets(buf, sizeof(buf), fp) != NULL) {
300 302
				strcrchomp(buf);
301 303
				if (quote_str)
......
308 310
	| SHOW_MESSAGE_NO_SIGNATURE
309 311
	{
310 312
		gchar buf[BUFFSIZE];
311
		FILE *fp;
313
		FILE *fp = NULL;
312 314

  
313 315
		if (body)
314 316
			fp = str_open_as_stream(body);
315
		else
317
		else if (msginfo->size > 0) {
316 318
			fp = procmime_get_first_text_content(msginfo, NULL);
319
			if (fp == NULL)
320
				g_warning("quote_fmt_parse.y: Can't get text part\n");
321
		}
317 322

  
318
		if (fp == NULL)
319
			g_warning("Can't get text part\n");
320
		else {
323
		if (fp) {
321 324
			while (fgets(buf, sizeof(buf), fp) != NULL) {
322 325
				strcrchomp(buf);
323 326
				if (strncmp(buf, "-- \n", 4) == 0)
......
330 333
	| SHOW_QUOTED_MESSAGE_NO_SIGNATURE
331 334
	{
332 335
		gchar buf[BUFFSIZE];
333
		FILE *fp;
336
		FILE *fp = NULL;
334 337

  
335 338
		if (body)
336 339
			fp = str_open_as_stream(body);
337
		else
340
		else if (msginfo->size > 0) {
338 341
			fp = procmime_get_first_text_content(msginfo, NULL);
342
			if (fp == NULL)
343
				g_warning("Can't get text part\n");
344
		}
339 345

  
340
		if (fp == NULL)
341
			g_warning("Can't get text part\n");
342
		else {
346
		if (fp) {
343 347
			while (fgets(buf, sizeof(buf), fp) != NULL) {
344 348
				strcrchomp(buf);
345 349
				if (strncmp(buf, "-- \n", 4) == 0)
ChangeLog
1 1
2013-03-28
2 2

  
3
	* src/quote_fmt_parse.y: prohibit warnings when target message does
4
	  not exist.
5

  
6
2013-03-28
7

  
3 8
	* src/compose.c: compose_template_apply(): enabled quotation of
4 9
	  messages on forwarding.
5 10

  

Also available in: Unified diff