remove compiler warnings openpgpsdk

This commit is contained in:
sehraf 2016-06-01 21:17:50 +02:00
parent 4a07e3cb30
commit ca90f1387d
5 changed files with 4 additions and 12 deletions

View File

@ -509,7 +509,7 @@ ops_boolean_t ops_write_transferable_public_key_from_packet_data(const ops_keyda
ops_create_info_t *info)
{
ops_boolean_t rtn = ops_true;
unsigned int i=0,j=0;
unsigned int i=0;
if (armoured)
{ ops_writer_push_armoured(info, OPS_PGP_PUBLIC_KEY_BLOCK); }
@ -532,7 +532,7 @@ ops_boolean_t ops_write_transferable_secret_key_from_packet_data(const ops_keyda
ops_create_info_t *info)
{
ops_boolean_t rtn = ops_true;
unsigned int i=0,j=0;
unsigned int i=0;
if(keydata->type != OPS_PTAG_CT_ENCRYPTED_SECRET_KEY)
{

View File

@ -309,11 +309,6 @@ ops_boolean_t ops_decrypt_memory(const unsigned char *encrypted_memory,int em_le
const ops_boolean_t use_armour,
ops_parse_cb_t* cb_get_passphrase)
{
int fd_in=0;
int fd_out=0;
char* myfilename=NULL;
//
ops_parse_info_t *pinfo=NULL;
// setup for reading from given input file
@ -368,7 +363,6 @@ ops_boolean_t ops_decrypt_memory(const unsigned char *encrypted_memory,int em_le
*decrypted_memory = ops_mallocz(*out_length) ;
memcpy(*decrypted_memory,ops_memory_get_data(output_mem),*out_length) ;
ops_decrypt_memory_ABORT:
ops_teardown_memory_write(pinfo->cbinfo.cinfo, output_mem);
ops_teardown_memory_read(pinfo, input_mem);

View File

@ -616,8 +616,6 @@ ops_boolean_t ops_add_selfsigned_userid_to_keydata(ops_keydata_t* keydata, ops_u
ops_boolean_t ops_sign_key(ops_keydata_t* keydata, const unsigned char *signers_key_id,ops_secret_key_t *signers_key)
{
/* ops_memory_t* mem_userid=NULL; */
ops_create_info_t* cinfo_userid=NULL;
ops_memory_t* mem_sig=NULL;
ops_create_info_t* cinfo_sig=NULL;

View File

@ -998,7 +998,7 @@ int ops_print_packet(const ops_parser_content_t *content_)
case OPS_PTAG_SS_EMBEDDED_SIGNATURE:
start_subpacket(content_->tag);
end_subpacket(content_->tag); // \todo print out contents?
end_subpacket(); // \todo print out contents?
break;
case OPS_PTAG_SS_USERDEFINED00:

View File

@ -118,7 +118,7 @@ void *ops_mallocz(size_t n)
void *m=malloc(n);
if(m == NULL)
fprintf(stderr,"(EE) Cannot allocate %d bytes of memory in %s\n",n,__PRETTY_FUNCTION__) ;
fprintf(stderr,"(EE) Cannot allocate %lu bytes of memory in %s\n",n,__PRETTY_FUNCTION__) ;
else
memset(m,'\0',n);