Fix FTBFS caused by wrong function prototype. This resolves issue #24

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 4a949318b7)
r14.1.x
Michele Calgaro 4 months ago
parent 390acf31db
commit 45f6f7105d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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);
}
}

Loading…
Cancel
Save