Quantcast

[PATCH] fix c++ warnings

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] fix c++ warnings

Jon Beniston

Hi,

 

The attached patch fixes some warnings/errors when compiled with g++ and another compiler:

 

-          Strings should be const char *.

-          Malloc needs to be cast from void * to char *.

-          Avoid mixing declarations with code.

 

Cheers,

Jon

 



libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]



cpp.patch (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] fix c++ warnings

Thomas Jarosch
Hi Jon,

On Sunday, 17. July 2016 10:35:59 Jon Beniston wrote:
> The attached patch fixes some warnings/errors when compiled with g++ and
> another compiler:

applied, thanks.

The patch is a "breaking" API change in ftdi_get_error_string(),
but it's very easy to fix and the right thing to do.
-> I've fixed the C++ wrapper.

On a different note: Patches created by "git format-patch"
are highly welcome since they contain a commit message, too :)

Cheers,
Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Loading...