Fixed most const warnings and added pragmas to ignore false warnings

Im using the OpenSC project to do some tests with smartcards and got annoyed by continuous warnings about const casts:

The OpenSC project master creates quite some warning concerning due to cons u8 * conversions to u8 *. These are correct but should be properly cast. There are some unused variables which also cause warnings. I simply got tired of them and wanted to avoid most (if not all) warnings as possible. Some are invalid and I added pragma statements to ignore the warnings. 
The failure of not checking the return value had been accepted into the code base already. My intention was not to change the code but to avoid all existing warning as they were already accepted into the master branch.
A better option would be to check the return value and deal with it properly. Void-casting disregards the value in the same way as it is done now (no warning, same code compilation).