From f180cc819f0ae6312dde6270314f85723e90f280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Mon, 8 Sep 2014 09:46:08 +0000 Subject: getting rid of compiler-warnings svn path=/trunk/externals/iem/iemmatrix/; revision=17345 --- src/mtx_qhull/entry.h | 2 +- src/mtx_qhull/list.c | 5 +++-- src/mtx_qhull/zhull.c | 14 +++++++------- 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'src/mtx_qhull') diff --git a/src/mtx_qhull/entry.h b/src/mtx_qhull/entry.h index d85da9a..f524d56 100644 --- a/src/mtx_qhull/entry.h +++ b/src/mtx_qhull/entry.h @@ -85,7 +85,7 @@ static void print_entry(const entry_t e) { switch(e.typ) { case INDEX: - printf("%d", e.val.i); + printf("%ul", (unsigned long)(e.val.i)); return; case POINTER: printf("0x%p", e.val.p); diff --git a/src/mtx_qhull/list.c b/src/mtx_qhull/list.c index 754516f..bc19c50 100644 --- a/src/mtx_qhull/list.c +++ b/src/mtx_qhull/list.c @@ -170,6 +170,7 @@ list_t getSubList(const list_t list, const list_t indices) { getEntry(list,entry_getIndex(&e1)) ); } + return new_list; } list_t getSubListFromTo(const list_t list, const index_t start, @@ -257,7 +258,7 @@ void removeValueListFromList(list_t *list, const list_t excl_list) { void reverseList(list_t * const list) { index_t i,j; entry_t v; - const cnt = getLength(*list)/ 2; + const size_t cnt = getLength(*list)/ 2; if (cnt>0) for (i=0, j=getLength(*list)-1; i0) { print_entry(getEntry(list,0)); } diff --git a/src/mtx_qhull/zhull.c b/src/mtx_qhull/zhull.c index 7832f39..5291980 100644 --- a/src/mtx_qhull/zhull.c +++ b/src/mtx_qhull/zhull.c @@ -337,7 +337,7 @@ static void printHorizonEdges(list_t *horizon_fcts, for (i=0; i%d",c1[0],c1[1]); + printf(", %ul->%ul",(unsigned long)c1[0],(unsigned long)c1[1]); } printf("\n"); } @@ -612,7 +612,7 @@ static void makePyramidFacetsToHorizon(zhull_t *zh, index_t point_index, freeList(&new_facets); } -static appendExteriorPoints(zhull_t *zh) { +static void appendExteriorPoints(zhull_t *zh) { index_t i; vector_t center = initVector(0.0f,0.0f,0.0f); list_t facet_delete_list=emptyList(); @@ -623,7 +623,7 @@ static appendExteriorPoints(zhull_t *zh) { printf("\n"); for (i=0; ifacets); i++) { f=getFacetByIndex(zh->facets,i); - printf("distance of plane %d, d=%5.2f\n",i, + printf("distance of plane %ul, d=%5.2f\n",(unsigned long)i, distancePointPlane(center,f->plane)); if (distancePointPlane(center,f->plane)>-0.5f) { appendToList(&facet_delete_list,entry_makePointer(f)); @@ -702,10 +702,10 @@ void printZhull(const zhull_t * const zh) { printList(indices); freeList(&indices); */ - printf("zhull has %d facets\n", getLength(zh->facets)); + printf("zhull has %ul facets\n", (unsigned long)getLength(zh->facets)); for (fi=0; fifacets); fi++) { - printf("facet %d<%d>: ",fi,getFacetByIndex(zh->facets,fi)); - printFacet(zh,getFacetByIndex(zh->facets,fi)); + printf("facet %ul<%p>: ",(unsigned long)fi,getFacetByIndex(zh->facets,fi)); + printFacet(zh,getFacetByIndex(zh->facets,fi)); } } @@ -725,6 +725,6 @@ void printFacet(const zhull_t * const zh, printf("neighbors: "); printList(indices); freeList(&indices); - printf("pt %d with maxdist %5.2f\n",f->farthest_outside_point, f->maxdistance); + printf("pt %ul with maxdist %5.2f\n",(unsigned long)(f->farthest_outside_point), f->maxdistance); } -- cgit v1.2.1