List Info

Thread: Re: silence more warnings.




Re: silence more warnings.
country flaguser name
United States
2007-06-21 15:38:08

Andreas Jellinghaus wrote:
> On Thursday 21 June 2007 15:26:54 Ludovic Rousseau
wrote:
>> You may have less warnings but now more errors 
> 
> yes, I was more or less working incrementally with
fixing some warnings, 
> committing, testing etc. my regression tests use a
fresh checkout, so I need 
> to commit before testing, which is somehow not optimal.
maybe I should use
> a distributed SCM instead.
> 
>> You can't have a variable declared static if you
also want to use it
>> from another source file. app_name is also used by
util.c
> 
> yes, I realized that too late. thanks for fixing it
too. with your latest 
> changes we can mark app_name and friends static in all
tools/*.c
> and thus kill those warnings.
> 
> the last open warnings I'm aware off:
>  - two warnings concerning some not defined setting in
cardos code.
>  - some warnings with openssl functions and wrong
parameter types.
>    but I have no clue why, those all look fine to me
(d2i_X509 or something
>    and seveal X509_* functions).  if you get those
warnings too from gcc or
>    sparse: any idea why we get it? what is wrong?

  It looks like it is expecting a pointer to a const
unsigned char *.


On Solaris 10 with gcc (GCC) 3.4.3
(csl-sol210-3_4-branch+sol_rpath)
as provided by Sun in /usr/sfw/bin:

   ./include/PCSC/reader.h:125: warning: #pragma pack(push[,
id], <n>) is
    not supported on this target

pkcs15-oberther.c has two unused variables.

And I have a couple of warnings in the PIV card routines
card-piv.c
   card-piv.c:1681: warning: implicit declaration of
function `isdigit'
and an unused variable.


compression.c:95 is calling the zlib uncompress with a
size_t* but should
be calling with a uLongf* which comes down to a ulong.

I will try and come up with a patch for piv and the
compression.c


> 
> Anyway, that collection of small changes fixed about
600 warnings, even if 
> most are harmless (like 0 instead of NULL).
> 
> Regards, Andreas
> _______________________________________________
> opensc-devel mailing list
> opensc-devellists.opensc-project.org
> http://www.opensc-project.org/mailman/listinfo/opensc
-devel
> 
> 

-- 

  Douglas E. Engert  <DEEngertanl.gov>
  Argonne National Laboratory
  9700 South Cass Avenue
  Argonne, Illinois  60439
  (630) 252-5444
_______________________________________________
opensc-devel mailing list
opensc-devellists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc
-devel

Re: silence more warnings.
user name
2007-06-22 01:33:24
On Thursday 21 June 2007 22:38:08 Douglas E. Engert wrote:
> > the last open warnings I'm aware off:
> >  - two warnings concerning some not defined
setting in cardos code.
> >  - some warnings with openssl functions and wrong
parameter types.
> >    but I have no clue why, those all look fine to
me (d2i_X509 or
> > something and seveal X509_* functions).  if you
get those warnings too
> > from gcc or sparse: any idea why we get it? what
is wrong?
>
>   It looks like it is expecting a pointer to a const
unsigned char *.

not sure about the pointer to pointer situation. normally
you can pass an
unsigned char when a const unsigned char is in the api. does
that change
when it is a pointer to a pointer? doest const qualify the
pointer or the
string?

anyway, adding "const" didn't help in my
experiment (or I did something 
wrong). can you try if it helps on your side?


> On Solaris 10 with gcc (GCC) 3.4.3
(csl-sol210-3_4-branch+sol_rpath)
> as provided by Sun in /usr/sfw/bin:
>
>    ./include/PCSC/reader.h:125: warning: #pragma
pack(push[, id], <n>) is
>     not supported on this target

what version of pcsc-lite is that? ludovic might be
interested in this 
warning.

> pkcs15-oberther.c has two unused variables.

with trunk? can you paste these warnings? I fixed some stuff
there.
>
> And I have a couple of warnings in the PIV card
routines card-piv.c
>    card-piv.c:1681: warning: implicit declaration of
function `isdigit'
> and an unused variable.

hmm, I added the relevant include in at least one file. it
should be
ctype.h

> compression.c:95 is calling the zlib uncompress with a
size_t* but should
> be calling with a uLongf* which comes down to a ulong.

should be fixed in trunk too. no idea why zlib is so using
ulong instead of 
size_t, but I did a cast without any proper checks etc.
might be a potential 
hole?

thanks for your help!

Regards, Andreas
_______________________________________________
opensc-devel mailing list
opensc-devellists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc
-devel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )