[sane-devel] hs2p backend

m. allan noah kitno455 at gmail.com
Wed Nov 21 02:28:22 UTC 2007


my flags from backend/Makefile (generated by stock configure)

CFLAGS = -g -O2 -W -Wall -Wcast-align -Wcast-qual
-Wmissing-declarations -Wmissing-prototypes -Wpointer-arith
-Wreturn-type -Wstrict-prototypes -pedantic -ansi

not sure why yours are not the same?

ok, current code recompiled on older 64 bit gcc, with above CFLAGS, my
comments in []:

In file included from hs2p.c:95:
hs2p-scsi.c: In function 'print_bytes':
hs2p-scsi.c:70: warning: cast discards qualifiers from pointer target type

[use const in your casts, since the arg is const void *]

hs2p.c: In function 'sane_hs2p_exit':
hs2p.c:1394: warning: cast discards qualifiers from pointer target type
hs2p.c:1395: warning: cast discards qualifiers from pointer target type

[this one i am not sure, cause we are trying to free a const string?]

hs2p.c: In function 'sane_hs2p_control_option':
hs2p.c:1869: warning: cast discards qualifiers from pointer target type

[paper_list is declared a SANE_String_Const array, but its cast to (char **)]

hs2p.c: In function 'set_window_data':
hs2p.c:2140: warning: cast discards qualifiers from pointer target type
hs2p.c:2144: warning: cast discards qualifiers from pointer target type
hs2p.c:2165: warning: cast discards qualifiers from pointer target type
hs2p.c:2195: warning: cast discards qualifiers from pointer target type
hs2p.c:2203: warning: cast discards qualifiers from pointer target type
hs2p.c:2216: warning: cast discards qualifiers from pointer target type
hs2p.c:2219: warning: cast discards qualifiers from pointer target type
hs2p.c: In function 'sane_hs2p_start':
hs2p.c:2326: warning: cast discards qualifiers from pointer target type

[same as above?]

again, this not at all required, and we've got the ansi C ones taken
care of, so dont worry too much.

allan
-- 
"The truth is an offense, but not a sin"



More information about the sane-devel mailing list