diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-02-16 10:20:08 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-02-16 10:20:08 +0100 |
commit | 778ebf8ee9cb22ea5727844333bcd5a6ee6bc0de (patch) | |
tree | a754e785b286ed82b45fe4e50b980714ad80e0a7 /backend/rts8891.c | |
parent | 7d8aac1f3634dc58785bec7acf097dd6bac8c394 (diff) | |
parent | 32cb765f681299af226ca0520993cbe47ba5ecd0 (diff) |
Merge branch 'release/debian/1.2.1-1'debian/1.2.1-1
Diffstat (limited to 'backend/rts8891.c')
-rw-r--r-- | backend/rts8891.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/backend/rts8891.c b/backend/rts8891.c index fa5d17a..2732871 100644 --- a/backend/rts8891.c +++ b/backend/rts8891.c @@ -76,6 +76,7 @@ #include <errno.h> #include <fcntl.h> #include <limits.h> +#include <math.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> @@ -306,7 +307,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize) { SANE_Status status; - authorize = authorize; /* get rid of compiler warning */ + (void) authorize; /* get rid of compiler warning */ /* init ASIC libraries */ sanei_rts88xx_lib_init (); @@ -4778,7 +4779,7 @@ dark_calibration (struct Rts8891_Device *dev, int mode, int light) global, ra, ga, ba); /* dichotomie ... */ - if (abs (ra - DARK_TARGET) < DARK_MARGIN) + if (fabs (ra - DARK_TARGET) < DARK_MARGIN) { /* offset is OK */ tro = ro; @@ -4800,7 +4801,7 @@ dark_calibration (struct Rts8891_Device *dev, int mode, int light) } /* same for blue channel */ - if (abs (ba - DARK_TARGET) < DARK_MARGIN) + if (fabs (ba - DARK_TARGET) < DARK_MARGIN) { bbo = bo; tbo = bo; @@ -4821,7 +4822,7 @@ dark_calibration (struct Rts8891_Device *dev, int mode, int light) } /* and for green channel */ - if (abs (ga - DARK_TARGET) < DARK_MARGIN) + if (fabs (ga - DARK_TARGET) < DARK_MARGIN) { tgo = go; bgo = go; @@ -5084,7 +5085,7 @@ gain_calibration (struct Rts8891_Device *dev, int mode, int light) global, ra, ga, ba); /* dichotomy again ... */ - if (abs (ra - RED_GAIN_TARGET) < GAIN_MARGIN) + if (fabs (ra - RED_GAIN_TARGET) < GAIN_MARGIN) { /* gain is OK, it is whitin the tolerance margin */ trg = rg; @@ -5125,7 +5126,7 @@ gain_calibration (struct Rts8891_Device *dev, int mode, int light) } /* same for blue channel */ - if (abs (ba - BLUE_GAIN_TARGET) < GAIN_MARGIN) + if (fabs (ba - BLUE_GAIN_TARGET) < GAIN_MARGIN) { bbg = bg; tbg = bg; @@ -5161,7 +5162,7 @@ gain_calibration (struct Rts8891_Device *dev, int mode, int light) } /* and for green channel */ - if (abs (ga - GREEN_GAIN_TARGET) < GAIN_MARGIN) + if (fabs (ga - GREEN_GAIN_TARGET) < GAIN_MARGIN) { tgg = gg; bgg = gg; @@ -5367,7 +5368,7 @@ offset_calibration (struct Rts8891_Device *dev, int mode, int light) global, ra, ga, ba); /* dichotomie ... */ - if (abs (ra - OFFSET_TARGET) < OFFSET_MARGIN) + if (fabs (ra - OFFSET_TARGET) < OFFSET_MARGIN) { /* offset is OK */ tro = ro; @@ -5389,7 +5390,7 @@ offset_calibration (struct Rts8891_Device *dev, int mode, int light) } /* same for blue channel */ - if (abs (ba - OFFSET_TARGET) < OFFSET_MARGIN) + if (fabs (ba - OFFSET_TARGET) < OFFSET_MARGIN) { bbo = bo; tbo = bo; @@ -5410,7 +5411,7 @@ offset_calibration (struct Rts8891_Device *dev, int mode, int light) } /* and for green channel */ - if (abs (ga - OFFSET_TARGET) < OFFSET_MARGIN) + if (fabs (ga - OFFSET_TARGET) < OFFSET_MARGIN) { tgo = go; bgo = go; |