|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-12 12:05 UTC] shire@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 18:00:01 2025 UTC |
Description: ------------ Stupid CodeWarrior compiler which we use to compile for NetWare platform doesnt handle line 827 of php_mailparse_mime.c: struct find_part_struct find = { name, NULL }; it seems that the compiler is too stupid to take vars here, and breaks compilation. Can you perhaps use single assignment here? Then I get a warning about var i not beeing initialized before used in line 58; looking at this I found that the compiler is right, and in addition valuepos isnt used at all - so I removed both. See patch below which fixes both issues. --- php_mailparse_mime.c.orig Tue Jan 08 21:20:20 2008 +++ php_mailparse_mime.c Tue Mar 11 15:50:54 2008 @@ -53,9 +53,7 @@ void rfc2231_to_mime(smart_str* value_buf, char* value, int charset_p, int prevcharset_p) { char *strp, *startofvalue = NULL; - int quotes=0; - int valuepos; - int i; + int quotes = 0; /* Process string, get positions and replace */ /* Set to start of buffer*/ @@ -77,7 +75,6 @@ *strp=0; } else { startofvalue = strp+1; - valuepos = i; } quotes++; @@ -824,7 +821,10 @@ PHP_MAILPARSE_API php_mimepart *php_mimepart_find_by_name(php_mimepart *parent, const char *name TSRMLS_DC) { - struct find_part_struct find = { name, NULL }; + struct find_part_struct find; + + find.searchfor = name; + find.foundpart = NULL; php_mimepart_enum_parts(parent, find_part_callback, &find TSRMLS_CC); return find.foundpart; }