[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
warnings in 'des' module
From: |
Bruno Haible |
Subject: |
warnings in 'des' module |
Date: |
Mon, 8 May 2006 15:17:26 +0200 |
User-agent: |
KMail/1.5 |
Hi Simon,
When compiling all of gnulib with SunPRO C 5.9 on Linux/x86, there is only
one file with warnings.
c89 -Xa -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\"
-DLIBDIR=\"/packages/inst-sunpro/lib\" -I. -I. -I.. -I../intl -xO5 -c des.c
"des.c", line 450: warning: assignment type mismatch:
pointer to const unsigned char "=" pointer to const char
"des.c", line 562: warning: assignment type mismatch:
pointer to const unsigned char "=" pointer to const char
"des.c", line 563: warning: assignment type mismatch:
pointer to unsigned char "=" pointer to char
"des.c", line 635: warning: assignment type mismatch:
pointer to const unsigned char "=" pointer to const char
"des.c", line 636: warning: assignment type mismatch:
pointer to unsigned char "=" pointer to char
Here is a fix: Add casts.
Bruno
*** lib/des.c.bak 2005-10-21 14:28:18.000000000 +0200
--- lib/des.c 2006-05-07 16:50:07.000000000 +0200
***************
*** 1,5 ****
/* des.c --- DES and Triple-DES encryption/decryption Algorithm
! * Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005
* Free Software Foundation, Inc.
*
* This file is free software; you can redistribute it and/or modify
--- 1,5 ----
/* des.c --- DES and Triple-DES encryption/decryption Algorithm
! * Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006
* Free Software Foundation, Inc.
*
* This file is free software; you can redistribute it and/or modify
***************
*** 447,453 ****
static void
des_key_schedule (const char * _rawkey, uint32_t * subkey)
{
! const unsigned char *rawkey = _rawkey;
uint32_t left, right, work;
int round;
--- 447,453 ----
static void
des_key_schedule (const char * _rawkey, uint32_t * subkey)
{
! const unsigned char *rawkey = (const unsigned char *) _rawkey;
uint32_t left, right, work;
int round;
***************
*** 559,566 ****
void
des_ecb_crypt (des_ctx *ctx, const char * _from, char * _to, int mode)
{
! const unsigned char *from = _from;
! unsigned char *to = _to;
uint32_t left, right, work;
uint32_t *keys;
--- 559,566 ----
void
des_ecb_crypt (des_ctx *ctx, const char * _from, char * _to, int mode)
{
! const unsigned char *from = (const unsigned char *) _from;
! unsigned char *to = (unsigned char *) _to;
uint32_t left, right, work;
uint32_t *keys;
***************
*** 632,639 ****
const char * _from,
char * _to, int mode)
{
! const unsigned char *from = _from;
! unsigned char *to = _to;
uint32_t left, right, work;
uint32_t *keys;
--- 632,639 ----
const char * _from,
char * _to, int mode)
{
! const unsigned char *from = (const unsigned char *) _from;
! unsigned char *to = (unsigned char *) _to;
uint32_t left, right, work;
uint32_t *keys;
- warnings in 'des' module,
Bruno Haible <=