Revision: 49334
http://brlcad.svn.sourceforge.net/brlcad/?rev=49334&view=rev
Author: erikgreenwald
Date: 2012-02-08 14:51:24 +0000 (Wed, 08 Feb 2012)
Log Message:
-----------
quell format warnings
Modified Paths:
--------------
brlcad/trunk/src/libbu/parse.c
brlcad/trunk/src/libbu/ptbl.c
brlcad/trunk/src/libbu/rb_delete.c
brlcad/trunk/src/libbu/rb_diag.c
brlcad/trunk/src/libbu/rb_insert.c
brlcad/trunk/src/libbu/rb_order_stats.c
brlcad/trunk/src/libbu/rb_rotate.c
Modified: brlcad/trunk/src/libbu/parse.c
===================================================================
--- brlcad/trunk/src/libbu/parse.c 2012-02-08 13:41:12 UTC (rev 49333)
+++ brlcad/trunk/src/libbu/parse.c 2012-02-08 14:51:24 UTC (rev 49334)
@@ -440,7 +440,7 @@
perror("fread");
bu_log("ERROR: bu_struct_get bad fread (%ld), file %s, line %d\n",
- i, __FILE__, __LINE__);
+ (long int)i, __FILE__, __LINE__);
return 0;
}
@@ -455,7 +455,7 @@
if (UNLIKELY(i != BU_GETPUT_MAGIC_1)) {
bu_log("ERROR: bad getput buffer header %p, s/b %x, was %s(0x%lx), file
%s, line %d\n",
(void *)ext->ext_buf, BU_GETPUT_MAGIC_1,
- bu_identify_magic(i), i, __FILE__, __LINE__);
+ bu_identify_magic(i), (long int)i, __FILE__, __LINE__);
bu_bomb("bad getput buffer");
}
ext->ext_nbytes = len;
@@ -467,7 +467,7 @@
if (UNLIKELY(i != len-6)) {
bu_log("ERROR: bu_struct_get bad fread (%ld), file %s, line %d\n",
- i, __FILE__, __LINE__);
+ (long int)i, __FILE__, __LINE__);
ext->ext_nbytes = 0;
bu_free(ext->ext_buf, "bu_struct_get full buffer");
ext->ext_buf = NULL;
@@ -480,7 +480,7 @@
if (UNLIKELY(i != BU_GETPUT_MAGIC_2)) {
bu_log("ERROR: bad getput buffer %p, s/b %x, was %s(0x%lx), file %s,
line %d\n",
(void *)ext->ext_buf, BU_GETPUT_MAGIC_2,
- bu_identify_magic(i), i, __FILE__, __LINE__);
+ bu_identify_magic(i), (long int)i, __FILE__, __LINE__);
ext->ext_nbytes = 0;
bu_free(ext->ext_buf, "bu_struct_get full buffer");
ext->ext_buf = NULL;
@@ -1140,7 +1140,7 @@
bu_log("\t%s=\"%V\"\n", sdp->sp_name, vls);
bu_log("\t\t(vls_magic)0x%lx (vls_offset)%zu (vls_len)%zu
(vls_max)%zu\n",
- vls->vls_magic, vls->vls_offset, vls->vls_len,
vls->vls_max);
+ (long unsigned int)vls->vls_magic, vls->vls_offset,
vls->vls_len, vls->vls_max);
}
break;
case 'i':
@@ -1471,7 +1471,7 @@
bu_vls_printf(vls_out, "\t%s=\"%V\"\n", sdp->sp_name, vls);
bu_vls_printf(vls_out, "\t\t(vls_magic)%ld (vls_offset)%zu
(vls_len)%zu (vls_max)%zu\n",
- vls->vls_magic, vls->vls_offset,
vls->vls_len, vls->vls_max);
+ (long unsigned int)vls->vls_magic,
vls->vls_offset, vls->vls_len, vls->vls_max);
}
break;
case 'i':
@@ -2213,7 +2213,7 @@
BU_STR_EQUAL(sp->sp_fmt, "%V")) {
if (sp->sp_count > 1) {
/* Make them all look like %###s */
- bu_vls_printf(logstr, "%%%lds", sp->sp_count);
+ bu_vls_printf(logstr, "%%%lds", (long int)sp->sp_count);
} else {
/* Singletons are specified by their actual character */
bu_vls_printf(logstr, "%%c");
@@ -2285,7 +2285,7 @@
bu_vls_printf(logstr,
"not enough values for \"%s\" argument:
should be %ld",
sdp->sp_name,
- sdp->sp_count);
+ (long int)sdp->sp_count);
return BRLCAD_ERROR;
}
for (ii = j = 0;
@@ -2320,7 +2320,7 @@
bu_vls_printf(logstr,
"not enough values for \"%V\"
argument: should be %ld",
sdp->sp_name,
- sdp->sp_count);
+ (long int)sdp->sp_count);
return BRLCAD_ERROR;
}
@@ -2339,7 +2339,7 @@
bu_vls_printf(logstr,
"not enough values for \"%s\" argument:
should have %ld",
sdp->sp_name,
- sdp->sp_count);
+ (long int)sdp->sp_count);
return BRLCAD_ERROR;
}
@@ -2358,7 +2358,7 @@
bu_vls_printf(logstr,
"not enough values for \"%s\"
argument: should have %ld",
sdp->sp_name,
- sdp->sp_count);
+ (long int)sdp->sp_count);
return BRLCAD_ERROR;
}
@@ -2402,7 +2402,7 @@
bu_vls_printf(logstr,
"not enough values for \"%s\" argument:
should have %ld",
sdp->sp_name,
- sdp->sp_count);
+ (long int)sdp->sp_count);
return BRLCAD_ERROR;
}
@@ -2421,7 +2421,7 @@
bu_vls_printf(logstr,
"not enough values for \"%s\"
argument: should have %ld",
sdp->sp_name,
- sdp->sp_count);
+ (long int)sdp->sp_count);
return BRLCAD_ERROR;
}
@@ -2467,7 +2467,7 @@
bu_vls_printf(&str,
"not enough values for \"%s\" argument:
should have %ld, only %d given",
sdp->sp_name,
- sdp->sp_count, argc);
+ (long int)sdp->sp_count, argc);
return BRLCAD_ERROR;
}
@@ -2479,7 +2479,7 @@
bu_vls_printf(logstr,
"not enough values for \"%s\"
argument: should have %ld, only %zu given",
sdp->sp_name,
- sdp->sp_count,
+ (long int)sdp->sp_count,
ii);
return BRLCAD_ERROR;
}
Modified: brlcad/trunk/src/libbu/ptbl.c
===================================================================
--- brlcad/trunk/src/libbu/ptbl.c 2012-02-08 13:41:12 UTC (rev 49333)
+++ brlcad/trunk/src/libbu/ptbl.c 2012-02-08 14:51:24 UTC (rev 49334)
@@ -242,8 +242,8 @@
BU_CK_PTBL(tbl);
- bu_log("%s: bu_ptbl array with %d entries\n",
- title, tbl->end);
+ bu_log("%s: bu_ptbl array with %ld entries\n",
+ title, (long int)tbl->end);
if (!verbose)
return;
Modified: brlcad/trunk/src/libbu/rb_delete.c
===================================================================
--- brlcad/trunk/src/libbu/rb_delete.c 2012-02-08 13:41:12 UTC (rev 49333)
+++ brlcad/trunk/src/libbu/rb_delete.c 2012-02-08 14:51:24 UTC (rev 49334)
@@ -111,7 +111,7 @@
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_DELETE))
bu_log("_rb_delete(%p, %p, %d): data=%p\n",
- tree, node, order, rb_data(node, order));
+ (void*)tree, (void*)node, order, rb_data(node, order));
if ((rb_left_child(node, order) == rb_null(tree))
|| (rb_right_child(node, order) == rb_null(tree)))
Modified: brlcad/trunk/src/libbu/rb_diag.c
===================================================================
--- brlcad/trunk/src/libbu/rb_diag.c 2012-02-08 13:41:12 UTC (rev 49333)
+++ brlcad/trunk/src/libbu/rb_diag.c 2012-02-08 14:51:24 UTC (rev 49334)
@@ -55,13 +55,13 @@
package = (node->rbn_package)[d_order];
pp = tree->rbt_print;
- bu_log("%*snode <%p>...\n", depth * 2, "", node);
- bu_log("%*s tree: <%p>\n", depth * 2, "", node->rbn_tree);
- bu_log("%*s parent: <%p>\n", depth * 2, "", rb_parent(node, d_order));
- bu_log("%*s left: <%p>\n", depth * 2, "", rb_left_child(node, d_order));
- bu_log("%*s right: <%p>\n", depth * 2, "", rb_right_child(node,
d_order));
+ bu_log("%*snode <%p>...\n", depth * 2, "", (void*)node);
+ bu_log("%*s tree: <%p>\n", depth * 2, "", (void*)node->rbn_tree);
+ bu_log("%*s parent: <%p>\n", depth * 2, "", (void*)rb_parent(node,
d_order));
+ bu_log("%*s left: <%p>\n", depth * 2, "", (void*)rb_left_child(node,
d_order));
+ bu_log("%*s right: <%p>\n", depth * 2, "", (void*)rb_right_child(node,
d_order));
bu_log("%*s color: %s\n", depth * 2, "", (rb_get_color(node, d_order) ==
RB_RED) ? "RED" : (rb_get_color(node, d_order) == RB_BLK) ? "BLACK" : "Huh?");
- bu_log("%*s package: <%p> ", depth * 2, "", package);
+ bu_log("%*s package: <%p> ", depth * 2, "", (void*)package);
if ((pp != 0) && (package != BU_RB_PKG_NULL))
(*pp)(package->rbp_data);
@@ -76,11 +76,11 @@
BU_CKMAG(tree, BU_RB_TREE_MAGIC, "red-black tree");
RB_CKORDER(tree, order);
- bu_log("-------- Red-black tree <%p> contents --------\n", tree);
+ bu_log("-------- Red-black tree <%p> contents --------\n", (void*)tree);
bu_log("Description: '%s'\n", tree->rbt_description);
bu_log("Order: %d of %d\n", order, tree->rbt_nm_orders);
- bu_log("Current: <%p>\n", tree->rbt_current);
- bu_log("Empty node: <%p>\n", tree->rbt_empty_node);
+ bu_log("Current: <%p>\n", (void*)tree->rbt_current);
+ bu_log("Empty node: <%p>\n", (void*)tree->rbt_empty_node);
bu_log("Uniqueness: %d\n", rb_get_uniqueness(tree, order));
d_order = order;
rb_walk(tree, order, _rb_describe_node, WALK_NODES, trav_type);
@@ -94,10 +94,10 @@
BU_CKMAG(tree, BU_RB_TREE_MAGIC, "red-black tree");
- bu_log("-------- Red-black tree <%p> summary --------\n", tree);
+ bu_log("-------- Red-black tree <%p> summary --------\n", (void*)tree);
bu_log("Description: '%s'\n", tree->rbt_description);
- bu_log("Current: <%p>\n", tree->rbt_current);
- bu_log("Empty node: <%p>\n", tree->rbt_empty_node);
+ bu_log("Current: <%p>\n", (void*)tree->rbt_current);
+ bu_log("Empty node: <%p>\n", (void*)tree->rbt_empty_node);
bu_log("Size (in nodes): %d\n", tree->rbt_nm_nodes);
bu_log("Number of orders: %d\n", tree->rbt_nm_orders);
bu_log("Debug bits: <0x%X>\n", tree->rbt_debug);
@@ -108,8 +108,8 @@
i,
rb_order_func(tree, i),
rb_get_uniqueness(tree, i) ? 'Y' : 'N',
- rb_root(tree, i),
- (rb_root(tree, i) == BU_RB_NODE_NULL) ? 0 : (rb_root(tree,
i)->rbn_package)[i],
+ (void*)rb_root(tree, i),
+ (rb_root(tree, i) == BU_RB_NODE_NULL) ? 0 :
(void*)(rb_root(tree, i)->rbn_package)[i],
(rb_root(tree, i) == BU_RB_NODE_NULL) ? 0 :
rb_data(rb_root(tree, i), i));
}
}
Modified: brlcad/trunk/src/libbu/rb_insert.c
===================================================================
--- brlcad/trunk/src/libbu/rb_insert.c 2012-02-08 13:41:12 UTC (rev 49333)
+++ brlcad/trunk/src/libbu/rb_insert.c 2012-02-08 14:51:24 UTC (rev 49334)
@@ -64,7 +64,7 @@
rb_size(new_node, order) = 1;
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_OS))
bu_log("_rb_insert(%p): size(%p, %d)=%d\n",
- new_node, new_node, order, rb_size(new_node, order));
+ (void*)new_node, (void*)new_node, order, rb_size(new_node,
order));
/*
* Perform vanilla-flavored binary-tree insertion
@@ -77,18 +77,18 @@
++rb_size(parent, order);
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_OS))
bu_log("_rb_insert(%p): size(%p, %d)=%d\n",
- new_node, parent, order, rb_size(parent, order));
+ (void*)new_node, (void*)parent, order, rb_size(parent,
order));
comparison = (*compare)(rb_data(new_node, order),
rb_data(node, order));
if (comparison < 0) {
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_INSERT))
bu_log("_rb_insert(%p): <_%d <%p>, going left\n",
- new_node, order, node);
+ (void*)new_node, order, (void*)node);
node = rb_left_child(node, order);
} else {
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_INSERT))
bu_log("_rb_insert(%p): >=_%d <%p>, going right\n",
- new_node, order, node);
+ (void*)new_node, order, (void*)node);
node = rb_right_child(node, order);
if (comparison == 0)
result = 1;
@@ -142,7 +142,7 @@
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_INSERT))
bu_log("_rb_insert(%p): comparison = %d, returning %d\n",
- new_node, comparison, result);
+ (void*)new_node, comparison, result);
return result;
}
@@ -176,7 +176,7 @@
{
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_UNIQ))
bu_log("bu_rb_insert(<%p>, <%p>, TBD) will return %d\n",
- tree, data, -(order + 1));
+ (void*)tree, (void*)data, -(order + 1));
return -(order + 1);
}
}
@@ -259,7 +259,7 @@
rb_size(node, order) = 1;
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_OS))
bu_log("bu_rb_insert(<%p>, <%p>, <%p>): size(%p, %d)=%d\n",
- tree, data, node, node, order, rb_size(node, order));
+ (void*)tree, (void*)data, (void*)node, (void*)node,
order, rb_size(node, order));
}
} else {
/* Otherwise, insert the node into the tree */
@@ -267,7 +267,7 @@
result += _rb_insert(tree, order, node);
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_UNIQ))
bu_log("bu_rb_insert(<%p>, <%p>, <%p>) will return %d\n",
- tree, data, node, result);
+ (void*)tree, (void*)data, (void*)node, result);
}
++(tree->rbt_nm_nodes);
Modified: brlcad/trunk/src/libbu/rb_order_stats.c
===================================================================
--- brlcad/trunk/src/libbu/rb_order_stats.c 2012-02-08 13:41:12 UTC (rev
49333)
+++ brlcad/trunk/src/libbu/rb_order_stats.c 2012-02-08 14:51:24 UTC (rev
49334)
@@ -49,7 +49,7 @@
rank = rb_size(rb_left_child(root, order), order) + 1;
if (UNLIKELY(root->rbn_tree->rbt_debug & BU_RB_DEBUG_OS))
bu_log("_rb_select(<%p>, %d, %d): rank=%d\n",
- root, order, k, rank);
+ (void*)root, order, k, rank);
if (rank == k)
return root;
@@ -71,13 +71,13 @@
if ((k < 1) || (k > tree->rbt_nm_nodes)) {
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_OS))
bu_log("bu_rb_select(<%p>, %d, %d): k out of bounds [1, %d]\n",
- tree, order, k, tree->rbt_nm_nodes);
+ (void*)tree, order, k, tree->rbt_nm_nodes);
rb_current(tree) = rb_null(tree);
return NULL;
}
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_OS))
bu_log("bu_rb_select(<%p>, %d, %d): root=<%p>\n",
- tree, order, k, rb_root(tree, order));
+ (void*)tree, order, k, (void*)rb_root(tree, order));
rb_current(tree) = node
= _rb_select(rb_root(tree, order), order, k);
Modified: brlcad/trunk/src/libbu/rb_rotate.c
===================================================================
--- brlcad/trunk/src/libbu/rb_rotate.c 2012-02-08 13:41:12 UTC (rev 49333)
+++ brlcad/trunk/src/libbu/rb_rotate.c 2012-02-08 14:51:24 UTC (rev 49334)
@@ -46,7 +46,7 @@
y = rb_right_child(x, order);
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_ROTATE))
- bu_log("rb_rot_left(<%p>, %d)...\n", x, order);
+ bu_log("rb_rot_left(<%p>, %d)...\n", (void*)x, order);
rb_right_child(x, order) = beta = rb_left_child(y, order);
if (beta != rb_null(tree))
@@ -67,7 +67,7 @@
rb_size(rb_right_child(x, order), order) + 1;
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_OS))
bu_log("After rotation, size(%p, %d)=%d, size(%p, %d)=%d\n",
- x, order, rb_size(x, order), y, order, rb_size(y, order));
+ (void*)x, order, rb_size(x, order), (void*)y, order, rb_size(y,
order));
}
@@ -87,7 +87,7 @@
x = rb_left_child(y, order);
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_ROTATE))
- bu_log("rb_rot_right(<%p>, %d)...\n", y, order);
+ bu_log("rb_rot_right(<%p>, %d)...\n", (void*)y, order);
rb_left_child(y, order) = beta = rb_right_child(x, order);
if (beta != rb_null(tree))
@@ -108,7 +108,7 @@
rb_size(rb_right_child(y, order), order) + 1;
if (UNLIKELY(tree->rbt_debug & BU_RB_DEBUG_OS))
bu_log("After rotation, size(%p, %d)=%d, size(%p, %d)=%d\n",
- x, order, rb_size(x, order), y, order, rb_size(y, order));
+ (void*)x, order, rb_size(x, order), (void*)y, order, rb_size(y,
order));
}
/** @} */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits