aboutsummaryrefslogtreecommitdiffstats
path: root/src/cg-icc.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-12-01 03:23:03 +0100
committerMattias Andrée <maandree@kth.se>2016-12-01 03:23:03 +0100
commit9ecf9c624c5272cf8d576ec173283ebfe72fd373 (patch)
tree8e098894b688a45144a6e7de81b97959490f0785 /src/cg-icc.c
parentAdd makefile (diff)
downloadcg-tools-9ecf9c624c5272cf8d576ec173283ebfe72fd373.tar.gz
cg-tools-9ecf9c624c5272cf8d576ec173283ebfe72fd373.tar.bz2
cg-tools-9ecf9c624c5272cf8d576ec173283ebfe72fd373.tar.xz
Fix warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/cg-icc.c')
-rw-r--r--src/cg-icc.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/cg-icc.c b/src/cg-icc.c
index a3e48cd..9396b71 100644
--- a/src/cg-icc.c
+++ b/src/cg-icc.c
@@ -61,7 +61,7 @@ const int64_t default_priority = 0;
/**
* The default class for the program
*/
-char* const default_class = PKGNAME "::cg-icc::standard";
+char default_class[] = PKGNAME "::cg-icc::standard";
@@ -196,6 +196,7 @@ int handle_opt(char* opt, char* arg)
usage();
}
return 0;
+ (void) arg;
}
@@ -326,7 +327,7 @@ int handle_args(int argc, char* argv[], char* method, char* site,
{
struct passwd* pw;
char* path = NULL;
- int free_fflag = 0, saved_errno;
+ int saved_errno;
int fd = -1, q = xflag + dflag;
q += (method != NULL) && !strcmp(method, "?");
q += (prio != NULL) && !strcmp(prio, "?");
@@ -374,6 +375,7 @@ int handle_args(int argc, char* argv[], char* method, char* site,
close(fd);
errno = saved_errno;
return cleanup(-1);
+ (void) site;
}
@@ -669,15 +671,15 @@ static int parse_icc(const char* restrict content, size_t n, libcoopgamma_ramps_
/* Get the gamma, brightness and contrast */
if (n - ptr < 9 * 4)
continue;
- r_gamma = (double)icc_uint32(content + ptr) / 65536L, ptr += 4;
- r_min = (double)icc_uint32(content + ptr) / 65536L, ptr += 4;
- r_max = (double)icc_uint32(content + ptr) / 65536L, ptr += 4;
- g_gamma = (double)icc_uint32(content + ptr) / 65536L, ptr += 4;
- g_min = (double)icc_uint32(content + ptr) / 65536L, ptr += 4;
- g_max = (double)icc_uint32(content + ptr) / 65536L, ptr += 4;
- b_gamma = (double)icc_uint32(content + ptr) / 65536L, ptr += 4;
- b_min = (double)icc_uint32(content + ptr) / 65536L, ptr += 4;
- b_max = (double)icc_uint32(content + ptr) / 65536L, ptr += 4;
+ r_gamma = icc_uint32(content + ptr), r_gamma /= 65536L, ptr += 4;
+ r_min = icc_uint32(content + ptr), r_min /= 65536L, ptr += 4;
+ r_max = icc_uint32(content + ptr), r_max /= 65536L, ptr += 4;
+ g_gamma = icc_uint32(content + ptr), g_gamma /= 65536L, ptr += 4;
+ g_min = icc_uint32(content + ptr), g_min /= 65536L, ptr += 4;
+ g_max = icc_uint32(content + ptr), g_max /= 65536L, ptr += 4;
+ b_gamma = icc_uint32(content + ptr), b_gamma /= 65536L, ptr += 4;
+ b_min = icc_uint32(content + ptr), b_min /= 65536L, ptr += 4;
+ b_max = icc_uint32(content + ptr), b_max /= 65536L, ptr += 4;
/* Initialise ramps */
*depth = LIBCOOPGAMMA_DOUBLE;