Re: New version of libccid: 1.4.15

Greg Troxel <[email protected]>
Newsgroups gmane.comp.lib.muscle
Message-ID <[email protected]>
Ludovic Rousseau <[email protected]> writes:

>> In pkgsrc, the following patches are applied against ccid, and probably
>> they should be applied upstream.
>>
>> $NetBSD: patch-ab,v 1.2 2012/12/15 00:29:31 pettai Exp $
>>
>> --- src/commands.c.orig 2012-12-11 19:36:05.000000000 +0000
>> +++ src/commands.c
>> @@ -161,7 +161,7 @@ RESPONSECODE CmdPowerOn(unsigned int rea
>>
>>                         /* Status Information? */
>>                         if (0x40 == tmp[0])
>> -                               ccid_error(tmp[2], __FILE__, __LINE__, __FUNCTION__);
>> +                               ccid_error(tmp[2], __FILE__, __LINE__, (const char *) __FUNCTION__);
>>                         return IFD_COMMUNICATION_ERROR;
>
> Why do you need to cast __FUNCTION__?
>
> What version and name of the compiler are you using?
> What is the type of __FUNCTION__ on your compiler?

pkgsrc controls builds on a lot of systems, with multiple compilers.
Typically this is gcc and clang, and sometimes others, of various
versions.

I don't have a log entry for the reason on the original patch.  I can
build without and see.

>> --- src/ccid_usb.c.orig 2012-12-11 19:45:39.000000000 +0000
>> +++ src/ccid_usb.c
>> @@ -1106,7 +1106,7 @@ int InterruptRead(int reader_index, int
>>         switch (ret)
>>         {
>>                 case LIBUSB_TRANSFER_COMPLETED:
>> -                       DEBUG_XXD("NotifySlotChange: ", buffer, actual_length);
>> +                       DEBUG_XXD("NotifySlotChange: ", (const unsigned char *) buffer, actual_length);
>>                         break;
>>
>>                 case LIBUSB_TRANSFER_TIMED_OUT:
>
> Using my source code [1], this code is at line 1246, not 1106. Strange.

I think that's because our patches get carried forward and we don't
regenerate the line numbers every version.  Sorry about that - I didn't
think through that this might be the case and that it would be
confusing.

> Again I don't see why you need to cast buffer.
> What is the warning for this code?
>
> Regards,
>
> [1] http://anonscm.debian.org/viewvc/pcsclite/trunk/Drivers/ccid/src/ccid_usb.c?view=markup

_______________________________________________
Muscle mailing list
[email protected]
http://lists.musclecard.com/mailman/listinfo/muscle_lists.musclecard.com
signature.asc (application/pgp-signature, 180 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlMM2dcACgkQ+vesoDJhHiXQkQCfet703fljeL4N8iE0NfQhNNrH
9AYAn1xBbtoskQBdE70O19VTsYMD0qc8
=7pgz
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.