kopia lustrzana https://gitlab.com/sane-project/backends
coolscan2, coolscan3: Fix initialization of enum members in struct
GCC warns when setting an enum member to 0 without an explicit cast. Use the corresponding value in the enum type instead.escl-add-user-and-password
rodzic
47fd7538bc
commit
6048724f22
|
@ -468,7 +468,10 @@ sane_open (SANE_String_Const name, SANE_Handle * h)
|
||||||
for (i_option = 0; i_option < CS2_N_OPTIONS; i_option++)
|
for (i_option = 0; i_option < CS2_N_OPTIONS; i_option++)
|
||||||
{
|
{
|
||||||
o.name = o.title = o.desc = NULL;
|
o.name = o.title = o.desc = NULL;
|
||||||
o.type = o.unit = o.cap = o.constraint_type = o.size = 0;
|
o.type = SANE_TYPE_BOOL;
|
||||||
|
o.unit = SANE_UNIT_NONE;
|
||||||
|
o.size = o.cap = 0;
|
||||||
|
o.constraint_type = SANE_CONSTRAINT_NONE;
|
||||||
o.constraint.range = NULL; /* only one union member needs to be NULLed */
|
o.constraint.range = NULL; /* only one union member needs to be NULLed */
|
||||||
switch (i_option)
|
switch (i_option)
|
||||||
{
|
{
|
||||||
|
|
|
@ -424,7 +424,10 @@ sane_open(SANE_String_Const name, SANE_Handle * h)
|
||||||
|
|
||||||
for (i_option = 0; i_option < CS3_N_OPTIONS; i_option++) {
|
for (i_option = 0; i_option < CS3_N_OPTIONS; i_option++) {
|
||||||
o.name = o.title = o.desc = NULL;
|
o.name = o.title = o.desc = NULL;
|
||||||
o.type = o.unit = o.cap = o.constraint_type = o.size = 0;
|
o.type = SANE_TYPE_BOOL;
|
||||||
|
o.unit = SANE_UNIT_NONE;
|
||||||
|
o.size = o.cap = 0;
|
||||||
|
o.constraint_type = SANE_CONSTRAINT_NONE;
|
||||||
o.constraint.range = NULL; /* only one union member needs to be NULLed */
|
o.constraint.range = NULL; /* only one union member needs to be NULLed */
|
||||||
switch (i_option) {
|
switch (i_option) {
|
||||||
case CS3_OPTION_NUM:
|
case CS3_OPTION_NUM:
|
||||||
|
|
Ładowanie…
Reference in New Issue