<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>24550</bug_id>
          
          <creation_ts>2009-03-12 10:32:23 -0700</creation_ts>
          <short_desc>Compiler warning for XMLTokenizerLibxml2.cpp</short_desc>
          <delta_ts>2009-03-31 13:24:21 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Craig Schlenter">craig.schlenter</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>113407</commentid>
    <comment_count>0</comment_count>
    <who name="Craig Schlenter">craig.schlenter</who>
    <bug_when>2009-03-12 10:32:23 -0700</bug_when>
    <thetext>gcc 4.3.3 throws out warnings about the return value of vasprintf being unused.

An example of the compilation failure is seen here in chromium where -Werror makes the compilation fail

http://code.google.com/p/chromium/issues/detail?id=7742#c23

I&apos;ll attach a patch which I unfortunately can&apos;t test as I can&apos;t get webkit svn to build at the moment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113409</commentid>
    <comment_count>1</comment_count>
      <attachid>28532</attachid>
    <who name="Craig Schlenter">craig.schlenter</who>
    <bug_when>2009-03-12 10:34:11 -0700</bug_when>
    <thetext>Created attachment 28532
patch to fix compiler warning

untested patch to fix compiler warning</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113461</commentid>
    <comment_count>2</comment_count>
      <attachid>28532</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-03-12 13:06:17 -0700</bug_when>
    <thetext>Comment on attachment 28532
patch to fix compiler warning

Is this really the only unused result warning in WebCore? If not, then why are we fixing this one case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113549</commentid>
    <comment_count>3</comment_count>
    <who name="Craig Schlenter">craig.schlenter</who>
    <bug_when>2009-03-12 21:42:25 -0700</bug_when>
    <thetext>I&apos;ve asked the original reporter for more feedback in the chromium issue tracker to see if there are other warnings/errors. I had originally assumed that one of the webkit merges introduced this problem but the vasprintf seems to have been there for ages according to svn blame so I need to dig a bit more to see why it&apos;s only showing up now as the reporter was compiling successfully before.

I unfortunately don&apos;t have the same compiler as the reporter btw. but I&apos;ll see if I can coax my machine (Fedora 9) into using a newer compiler and investigate this properly.

In this particular case btw., if the vasprintf call fails the invalid buffer returned by vasprintf will be freed a couple of lines further on which will probably result in a crash although arguably if that is failing not much else is likely to work either.

Thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113649</commentid>
    <comment_count>4</comment_count>
    <who name="Craig Schlenter">craig.schlenter</who>
    <bug_when>2009-03-13 12:17:12 -0700</bug_when>
    <thetext>I think I know why the chromium reporter sees this and I don&apos;t even after upgrading my fedora 9 system to gcc 4.4.0 and glibc-2.9.90 ... it seems as if ubuntu 8.10 has some default compiler flag settings that include FORTIFY_SOURCE that is activated at -O2 and higher: https://wiki.ubuntu.com/CompilerFlags

I&apos;ll fiddle with getting my machine into equivalent shape tomorrow and track down the related errors/warnings ....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113821</commentid>
    <comment_count>5</comment_count>
    <who name="Craig Schlenter">craig.schlenter</who>
    <bug_when>2009-03-15 07:51:42 -0700</bug_when>
    <thetext>After compiling with -D_FORTIFY_SOURCE=2 this seems to be the only warn_unused_result. GCC-4.4.0 has shown up some other issues (a missing include and possibly some strict aliasing issues) but I&apos;ll file separate bugs for those.

Thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115912</commentid>
    <comment_count>6</comment_count>
      <attachid>28532</attachid>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2009-03-30 15:24:05 -0700</bug_when>
    <thetext>Comment on attachment 28532
patch to fix compiler warning

Sounds good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116061</commentid>
    <comment_count>7</comment_count>
    <who name="Dmitry Titov">dimich</who>
    <bug_when>2009-03-31 13:24:21 -0700</bug_when>
    <thetext>Landed: http://trac.webkit.org/changeset/42139

Please add the link to the bug into ChangeLog description next time.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>28532</attachid>
            <date>2009-03-12 10:34:11 -0700</date>
            <delta_ts>2009-03-30 15:24:05 -0700</delta_ts>
            <desc>patch to fix compiler warning</desc>
            <filename>webkit.diff</filename>
            <type>text/plain</type>
            <size>1102</size>
            <attacher name="Craig Schlenter">craig.schlenter</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA0MTYzMCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTMgQEAKKzIwMDktMDMtMTIgIENyYWlnIFNjaGxlbnRlciAgPGNyYWlnLnNjaGxl
bnRlckBnbWFpbC5jb20+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisK
KyAgICAgICAgQ2hlY2sgcmV0dXJuIHZhbHVlIG9mIHZhc3ByaW50Zi4gVGhpcyBzaG91bGQga2Vl
cCBnY2MgNC4zLjMKKyAgICAgICAgaGFwcHkgcmF0aGVyIHRoYW4gaGF2ZSBpdCBjb21wbGFpbiBh
Ym91dCBhdHRyaWJ1dGUgd2Fybl91bnVzZWRfcmVzdWx0LgorCisgICAgICAgICogZG9tL1hNTFRv
a2VuaXplckxpYnhtbDIuY3BwOgorICAgICAgICAoV2ViQ29yZTo6WE1MVG9rZW5pemVyOjplcnJv
cik6CisKIDIwMDktMDMtMTIgIEFkYW0gVHJlYXQgIDxhZGFtLnRyZWF0QHRvcmNobW9iaWxlLmNv
bT4KIAogICAgICAgICBSZXZpZXdlZCBieSBHZW9yZ2UgU3RhaWtvcy4KSW5kZXg6IFdlYkNvcmUv
ZG9tL1hNTFRva2VuaXplckxpYnhtbDIuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvZG9tL1hN
TFRva2VuaXplckxpYnhtbDIuY3BwCShyZXZpc2lvbiA0MTYxNikKKysrIFdlYkNvcmUvZG9tL1hN
TFRva2VuaXplckxpYnhtbDIuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC04NDUsNyArODQ1LDggQEAg
dm9pZCBYTUxUb2tlbml6ZXI6OmVycm9yKEVycm9yVHlwZSB0eXBlLAogICAgIHZzbnByaW50Ziht
LCBzaXplb2YobSkgLSAxLCBtZXNzYWdlLCBhcmdzKTsKICNlbHNlCiAgICAgY2hhciogbTsKLSAg
ICB2YXNwcmludGYoJm0sIG1lc3NhZ2UsIGFyZ3MpOworICAgIGlmICh2YXNwcmludGYoJm0sIG1l
c3NhZ2UsIGFyZ3MpID09IC0xKQorICAgICAgICByZXR1cm47CiAjZW5kaWYKICAgICAKICAgICBp
ZiAobV9wYXJzZXJQYXVzZWQpCg==
</data>
<flag name="review"
          id="14018"
          type_id="1"
          status="+"
          setter="dglazkov"
    />
          </attachment>
      

    </bug>

</bugzilla>