summaryrefslogtreecommitdiff
path: root/camlibs/mars
diff options
context:
space:
mode:
authorSiim Meerits <sh0@yutani.ee>2020-08-02 06:40:46 +0300
committerMarcus Meissner <marcus@jet.franken.de>2020-08-28 19:08:22 +0200
commitbd890398c74ae91f3bc16e4493e44f18b9dd7ac5 (patch)
tree60a3de93371d3bdd95bfbd1352730720ea31350a /camlibs/mars
parent49ac707c5215a9a20b34421872424ea89f0aca47 (diff)
downloadlibgphoto2-bd890398c74ae91f3bc16e4493e44f18b9dd7ac5.tar.gz
Fix mars camlib compilation warnings.
Resolve signed-unsigned issues in histogram(...) and white_balance(...) which are functions that have been copied to multiple camlibs.
Diffstat (limited to 'camlibs/mars')
-rw-r--r--camlibs/mars/mars.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/camlibs/mars/mars.c b/camlibs/mars/mars.c
index d27432465..4cc6cd47a 100644
--- a/camlibs/mars/mars.c
+++ b/camlibs/mars/mars.c
@@ -387,7 +387,7 @@ mars_routine (Info *info, GPPort *port, char param, int n)
int
histogram (unsigned char *data, unsigned int size, int *htable_r, int *htable_g, int *htable_b)
{
- int x;
+ unsigned int x;
/* Initializations */
for (x = 0; x < 0x100; x++) {
htable_r[x] = 0;
@@ -408,7 +408,8 @@ int
mars_white_balance (unsigned char *data, unsigned int size, float saturation,
float image_gamma)
{
- int x, r, g, b, max, d;
+ unsigned int x, max;
+ int r, g, b, d;
double r_factor, g_factor, b_factor, max_factor;
int htable_r[0x100], htable_g[0x100], htable_b[0x100];
unsigned char gtable[0x100];