[xml] Last compiler warnings (Windows)



Hello Daniel, All,

There are few compiler warning which are annoying, at least today. I would
like to eliminate those before the movie begins :-)

Two macros from include/win32config.h are conflicting with their siblings
from errno.h, and that while compiling nanoftp.c and nanohttp.c. Since these
are there just for completeness and are not being used in the code, I
thought it okay to comment them out. The patch is further below and if there
are no objections, I would commit it.

Two functions, xmlDocCopyNode and xmlCopyNodeList, have the first parameter
declared differently in the prototype (tree.h) and the implementation
(tree.c). Since the declaration in tree.c seems more apropriate to me, the
one in tree.h could be adapted to match it. The patch for this is also
further below and if there are no objections, I would commit this one as
well. Please beware: this is a change in a public header file! While it
would eliminate the warning in libxml, it could introduce hundreds of
warnings in hundreds of applications which use libxml. On the other side,
that should not prevent us from making the API cleaner. Should I apply it,
or rather wait for the end of the API-freeze period?

Ciao
Igor

Patch for include/libxml/tree.h follows:


*** include/libxml/tree.h       16 Apr 2002 17:53:11 -0000      1.107
--- include/libxml/tree.h       16 Apr 2002 19:22:51 -0000
***************
*** 644,653 ****
                                         const xmlChar *name);
  xmlNodePtr    xmlCopyNode             (const xmlNodePtr node,
                                         int recursive);
! xmlNodePtr    xmlDocCopyNode          (xmlNodePtr node,
                                         xmlDocPtr doc,
                                         int recursive);
! xmlNodePtr    xmlCopyNodeList         (xmlNodePtr node);
  xmlNodePtr    xmlNewDocFragment       (xmlDocPtr doc);

  /*
--- 644,653 ----
                                         const xmlChar *name);
  xmlNodePtr    xmlCopyNode             (const xmlNodePtr node,
                                         int recursive);
! xmlNodePtr    xmlDocCopyNode          (const xmlNodePtr node,
                                         xmlDocPtr doc,
                                         int recursive);
! xmlNodePtr    xmlCopyNodeList         (const xmlNodePtr node);
  xmlNodePtr    xmlNewDocFragment       (xmlDocPtr doc);

  /*


Patch for include/win32config.h follows:


*** include/win32config.h       8 Feb 2002 13:44:24 -0000       1.15
--- include/win32config.h       16 Apr 2002 19:09:52 -0000
***************
*** 10,19 ****

  #include <io.h>

- #define SOCKLEN_T int
  #ifdef NEED_SOCKETS
  #include <winsock2.h>

  #define EWOULDBLOCK             WSAEWOULDBLOCK
  #define EINPROGRESS             WSAEINPROGRESS
  #define EALREADY                WSAEALREADY
--- 10,22 ----

  #include <io.h>

  #ifdef NEED_SOCKETS
  #include <winsock2.h>

+ #if !defined SOCKLEN_T
+ #define SOCKLEN_T int
+ #endif
+
  #define EWOULDBLOCK             WSAEWOULDBLOCK
  #define EINPROGRESS             WSAEINPROGRESS
  #define EALREADY                WSAEALREADY
***************
*** 42,57 ****
  #define ETIMEDOUT               WSAETIMEDOUT
  #define ECONNREFUSED            WSAECONNREFUSED
  #define ELOOP                   WSAELOOP
- #define ENAMETOOLONG            WSAENAMETOOLONG
  #define EHOSTDOWN               WSAEHOSTDOWN
  #define EHOSTUNREACH            WSAEHOSTUNREACH
- #define ENOTEMPTY               WSAENOTEMPTY
  #define EPROCLIM                WSAEPROCLIM
  #define EUSERS                  WSAEUSERS
  #define EDQUOT                  WSAEDQUOT
  #define ESTALE                  WSAESTALE
  #define EREMOTE                 WSAEREMOTE
! #endif /* INCLUDE_WINSOCK */

  #define HAVE_ISINF
  #define HAVE_ISNAN
--- 45,65 ----
  #define ETIMEDOUT               WSAETIMEDOUT
  #define ECONNREFUSED            WSAECONNREFUSED
  #define ELOOP                   WSAELOOP
  #define EHOSTDOWN               WSAEHOSTDOWN
  #define EHOSTUNREACH            WSAEHOSTUNREACH
  #define EPROCLIM                WSAEPROCLIM
  #define EUSERS                  WSAEUSERS
  #define EDQUOT                  WSAEDQUOT
  #define ESTALE                  WSAESTALE
  #define EREMOTE                 WSAEREMOTE
! /* These cause conflicts with the codes from errno.h. Since they are
!    not used in the relevant code (nanoftp, nanohttp), we can leave
!    them disabled.
! #define ENAMETOOLONG            WSAENAMETOOLONG
! #define ENOTEMPTY               WSAENOTEMPTY
! */
!
! #endif /* NEED_SOCKETS */

  #define HAVE_ISINF
  #define HAVE_ISNAN






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