[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#344311: marked as done (libmxml-dev: the man documentation makes the developer write bug?)



Your message dated Thu, 12 Jul 2007 22:58:47 -0500
with message-id <20070713035847.GA26009@petunia>
and subject line libmxml-dev: the man documentation makes the developer write bug?
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libmxml-dev
Version: 2.2-1
Severity: normal


The manual page of documentation propose the following code:

           FILE *fp;
           mxml_node_t *tree;

           fp = fopen("filename.xml", "w");
           mxmlSaveFile(tree, fp, MXML_NO_CALLBACK);
           fclose(fp);

I just do not understand how it should work, for the following reasons:
1/ tree is not initialized (this mean random value).
2/ *tree is not initialized (this mean random values).
3/ the include file does show none function to initialize the tree
structure.

Isn't this a risk to make developers write bogus code?



-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)

Versions of packages libmxml-dev depends on:
ii  libmxml1                      2.2-1      development files for libmlxml

libmxml-dev recommends no packages.

-- no debconf information


--- End Message ---
--- Begin Message ---
Hi,

On Fri, Jul 13, 2007 at 03:30:02AM +0000, Debian Bug Tracking System wrote:
> The manual page of documentation propose the following code:
> 
>            FILE *fp;
>            mxml_node_t *tree;
> 
>            fp = fopen("filename.xml", "w");
>            mxmlSaveFile(tree, fp, MXML_NO_CALLBACK);
>            fclose(fp);
> 
> I just do not understand how it should work, for the following reasons:
> 1/ tree is not initialized (this mean random value).
> 2/ *tree is not initialized (this mean random values).
> 3/ the include file does show none function to initialize the tree
> structure.
> 
> Isn't this a risk to make developers write bogus code?

I don't think so, later in the manual it says: "The first argument is the XML
node tree to save. It should normally be a pointer to the top-level ?xml node
in your XML document."

There is no need to put the full code of the examples in the manual, the
primary use of this is to show how the functions should be called, is the
developer responsability to check the values passed to the functions.

Cheers,

-- 
 .''`.
 : :' :      Luis
 `. `'       http://eviled.org
   `-        A proud debian user/maintainer

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: