aboutsummaryrefslogtreecommitdiff
path: root/src/mtx_qhull
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2014-09-08 09:46:08 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2014-09-08 09:46:08 +0000
commitf180cc819f0ae6312dde6270314f85723e90f280 (patch)
treeff4999bb455d858f970e798973ae44fcf319005f /src/mtx_qhull
parentbc326b64aa62f4eed9cfc2ccd38acfd36b97b31c (diff)
getting rid of compiler-warnings
svn path=/trunk/externals/iem/iemmatrix/; revision=17345
Diffstat (limited to 'src/mtx_qhull')
-rw-r--r--src/mtx_qhull/entry.h2
-rw-r--r--src/mtx_qhull/list.c5
-rw-r--r--src/mtx_qhull/zhull.c14
3 files changed, 11 insertions, 10 deletions
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; i<cnt; i++, j--) {
v=getEntry(*list,i);
@@ -330,7 +331,7 @@ int notInList(const entry_t entry, const list_t list) {
void printList(list_t const list) {
index_t i;
const size_t len=getLength(list);
- printf("[list]_%d=[",len);
+ printf("[list]_%d=[",(int)len);
if (len>0) {
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<getLength(*horizon_fcts_edges); i++) {
getHorizonEdgeByIndex(c1, *horizon_fcts, *horizon_fcts_edges,
*other_horizon_edges, i);
- printf(", %d->%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; i<getLength(zh->facets); 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; fi<getLength(zh->facets); 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);
}