Skip to content
Browse files

testapi: use the right type for the check

Fixes a compiler warning. Also wrap the long line if statement.
  • Loading branch information...
1 parent fdd3c04 commit 0329a1471ee1c2ab4f4b46a2adae37dc52739257 @ensonic ensonic committed May 9, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 testapi.c
View
6 testapi.c
@@ -599,7 +599,7 @@ static void des_xmlTextReaderPtr(int no ATTRIBUTE_UNUSED, xmlTextReaderPtr val,
#endif
#define gen_nb_xmlBufferPtr 3
-static const char *static_buf_content = "a static buffer";
+static const xmlChar *static_buf_content = (xmlChar *)"a static buffer";
static xmlBufferPtr gen_xmlBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {
if (no == 0) return(xmlBufferCreate());
if (no == 1) return(xmlBufferCreateStatic((void *)static_buf_content, 13));
@@ -18770,7 +18770,9 @@ test_xmlBufferSetAllocationScheme(void) {
scheme = gen_xmlBufferAllocationScheme(n_scheme, 1);
xmlBufferSetAllocationScheme(buf, scheme);
- if ((buf != NULL) && (scheme == XML_BUFFER_ALLOC_IMMUTABLE) && (buf->content != NULL) && (buf->content != static_buf_content)) { xmlFree(buf->content); buf->content = NULL;}
+ if ((buf != NULL) && (scheme == XML_BUFFER_ALLOC_IMMUTABLE) && (buf->content != NULL) && (buf->content != static_buf_content)) {
+ xmlFree(buf->content); buf->content = NULL;
+ }
call_tests++;
des_xmlBufferPtr(n_buf, buf, 0);
des_xmlBufferAllocationScheme(n_scheme, scheme, 1);

0 comments on commit 0329a14

Please sign in to comment.
Something went wrong with that request. Please try again.