* packet.h, build-packet.c (build_attribute_subpkt), exec.c (expand_args),

mkdtemp.c (mkdtemp), photoid.c (parse_image_header): Fix some signedness
compiler warnings.
This commit is contained in:
David Shaw 2002-07-01 16:40:52 +00:00
parent f7bf66d89d
commit b672df87d6
6 changed files with 17 additions and 10 deletions

View File

@ -1,3 +1,9 @@
2002-07-01 David Shaw <dshaw@jabberwocky.com>
* packet.h, build-packet.c (build_attribute_subpkt), exec.c
(expand_args), mkdtemp.c (mkdtemp), photoid.c
(parse_image_header): Fix some signedness compiler warnings.
2002-07-01 Werner Koch <wk@gnupg.org>
* encode.c (encode_symmetric): Do not use the new encryption code.

View File

@ -872,8 +872,8 @@ build_sig_subpkt_from_sig( PKT_signature *sig )
void
build_attribute_subpkt(PKT_user_id *uid,byte type,
const void *buf,int buflen,
const void *header,int headerlen)
const void *buf,u32 buflen,
const void *header,u32 headerlen)
{
byte *attrib;
int idx;
@ -912,7 +912,8 @@ build_attribute_subpkt(PKT_user_id *uid,byte type,
/* Tack on our data at the end */
memcpy(&attrib[idx],header,headerlen);
if(headerlen>0)
memcpy(&attrib[idx],header,headerlen);
memcpy(&attrib[idx+headerlen],buf,buflen);
uid->attrib_len+=idx+headerlen+buflen;
}

View File

@ -172,7 +172,7 @@ static int make_tempdir(struct exec_info *info)
static int expand_args(struct exec_info *info,const char *args_in)
{
const char *ch=args_in;
int size,len;
unsigned int size,len;
info->use_temp_files=0;
info->keep_temp_files=0;

View File

@ -38,7 +38,7 @@
char *mkdtemp(char *template)
{
int attempts,idx,count=0;
unsigned int attempts,idx,count=0;
byte *ch;
idx=strlen(template);
@ -61,7 +61,7 @@ char *mkdtemp(char *template)
/* Try 4 times to make the temp directory */
for(attempts=0;attempts<4;attempts++)
{
int remaining=count;
unsigned int remaining=count;
char *marker=ch;
byte *randombits;

View File

@ -154,7 +154,7 @@ typedef struct {
struct user_attribute {
byte type;
const byte *data;
unsigned long len;
u32 len;
};
typedef struct {
@ -413,8 +413,8 @@ void build_sig_subpkt( PKT_signature *sig, sigsubpkttype_t type,
void build_sig_subpkt_from_sig( PKT_signature *sig );
int delete_sig_subpkt(subpktarea_t *buffer, sigsubpkttype_t type );
void build_attribute_subpkt(PKT_user_id *uid,byte type,
const void *buf,int buflen,
const void *header,int headerlen);
const void *buf,u32 buflen,
const void *header,u32 headerlen);
/*-- free-packet.c --*/
void free_symkey_enc( PKT_symkey_enc *enc );

View File

@ -158,7 +158,7 @@ PKT_user_id *generate_photo_id(PKT_public_key *pk)
/* Returns 0 for error, 1 for valid */
int parse_image_header(const struct user_attribute *attr,byte *type,u32 *len)
{
int headerlen;
u16 headerlen;
if(attr->len<3)
return 0;