summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-11-10 22:01:48 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-11-11 20:31:24 +0900
commit4a949318b7a3279057101329445337be6b7640cb (patch)
tree6fc5836db55d376678ca49ecdbf7fbd5a38a0fb4
parent6fcff847f044a984fc0321d9fcff36197776ce5a (diff)
downloadlibkdcraw-4a949318b7a3279057101329445337be6b7640cb.tar.gz
libkdcraw-4a949318b7a3279057101329445337be6b7640cb.zip
Fix FTBFS caused by wrong function prototype. This resolves issue #24
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--libkdcraw/libraw/samples/half_mt.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libkdcraw/libraw/samples/half_mt.c b/libkdcraw/libraw/samples/half_mt.c
index 8f91b8f..e44cd55 100644
--- a/libkdcraw/libraw/samples/half_mt.c
+++ b/libkdcraw/libraw/samples/half_mt.c
@@ -35,7 +35,7 @@
if(LIBRAW_FATAL_ERROR(ret)) \
{ \
libraw_close(iprc); \
- return -1; \
+ return (void*)-1; \
} \
} \
}while(0)
@@ -62,7 +62,7 @@ char *get_next_file()
// thread routine
-int process_files(void *q)
+void* process_files(void *q)
{
int ret;
int count=0;
@@ -72,7 +72,7 @@ int process_files(void *q)
if(!iprc)
{
fprintf(stderr,"Cannot create libraw handle\n");
- return -1;
+ return (void*)-1;
}
while((fn = get_next_file()))
@@ -101,7 +101,7 @@ int process_files(void *q)
count++;
}
libraw_close(iprc);
- return count;
+ return (void*)count;
}
void usage(const char*p)
@@ -165,12 +165,12 @@ int main(int ac, char *av[])
pthread_create(&threads[i],NULL,process_files,NULL);
for(i=0;i<max_threads;i++)
{
- int *iptr;
+ void *vptr;
if(threads[i])
{
- pthread_join(threads[i],&iptr);
- if(iptr)
- printf("Thread %d : %d files\n",i,(int)iptr);
+ pthread_join(threads[i],&vptr);
+ if(vptr)
+ printf("Thread %d : %d files\n",i,(int)vptr);
}
}