summaryrefslogtreecommitdiff
path: root/src/libpiano
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2011-12-23 21:59:34 +0100
committerLars-Dominik Braun <lars@6xq.net>2011-12-23 21:59:34 +0100
commitcad2be0b4ffd9490ca83cdb355b6402838811413 (patch)
treea798f3199bbab548362bf95f49055b80dfdf3026 /src/libpiano
parent65517aebee0a7624b31dd9ce481e7f00ece3d497 (diff)
downloadpianobar-windows-cad2be0b4ffd9490ca83cdb355b6402838811413.tar.gz
pianobar-windows-cad2be0b4ffd9490ca83cdb355b6402838811413.tar.bz2
pianobar-windows-cad2be0b4ffd9490ca83cdb355b6402838811413.zip
Fix warnings found by -Wcast-qual
Diffstat (limited to 'src/libpiano')
-rw-r--r--src/libpiano/crypt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libpiano/crypt.c b/src/libpiano/crypt.c
index 9c96629..e833868 100644
--- a/src/libpiano/crypt.c
+++ b/src/libpiano/crypt.c
@@ -48,7 +48,7 @@ THE SOFTWARE.
#define INITIAL_SHIFT 28
#define SHIFT_DEC 4
char *PianoDecryptString (const char * const s) {
- const unsigned char *strInput = (unsigned char *) s;
+ const unsigned char *strInput = (const unsigned char *) s;
/* hex-decode => strlen/2 + null-byte */
uint32_t *iDecrypt;
char *strDecrypted;
@@ -56,7 +56,7 @@ char *PianoDecryptString (const char * const s) {
/* blowfish blocks, 32-bit */
uint32_t f, l, r, lrExchange;
- if ((iDecrypt = calloc (strlen ((char *) strInput)/2/sizeof (*iDecrypt)+1,
+ if ((iDecrypt = calloc (strlen ((const char *) strInput)/2/sizeof (*iDecrypt)+1,
sizeof (*iDecrypt))) == NULL) {
return NULL;
}
@@ -122,8 +122,8 @@ char *PianoDecryptString (const char * const s) {
* @return encrypted, hex-encoded string
*/
char *PianoEncryptString (const char *s) {
- const unsigned char *strInput = (unsigned char *) s;
- const size_t strInputN = strlen ((char *) strInput);
+ const unsigned char *strInput = (const unsigned char *) s;
+ const size_t strInputN = strlen ((const char *) strInput);
/* num of 64-bit blocks, rounded to next block */
size_t blockN = strInputN / 8 + 1;
uint32_t *blockInput, *blockPtr;