Sync: fix compiler warnings on Windows.
authorMarkus Schaber <markus@pep-security.net>
Fri, 07 Oct 2016 22:04:07 +0200
changeset 1259e5bc79871fbb
parent 1258 9c376b153898
child 1260 a7941fbec6d5
Sync: fix compiler warnings on Windows.
src/mime.c
src/pEpEngine.c
src/sync.c
src/sync_impl.c
     1.1 --- a/src/mime.c	Fri Oct 07 21:51:08 2016 +0200
     1.2 +++ b/src/mime.c	Fri Oct 07 22:04:07 2016 +0200
     1.3 @@ -78,10 +78,6 @@
     1.4      *mimetext = buf;
     1.5      return PEP_STATUS_OK;
     1.6  
     1.7 -err_buffer:
     1.8 -    status = PEP_BUFFER_TOO_SMALL;
     1.9 -    goto pep_error;
    1.10 -
    1.11  err_file:
    1.12      status = PEP_CANNOT_CREATE_TEMP_FILE;
    1.13      goto pep_error;
     2.1 --- a/src/pEpEngine.c	Fri Oct 07 21:51:08 2016 +0200
     2.2 +++ b/src/pEpEngine.c	Fri Oct 07 22:04:07 2016 +0200
     2.3 @@ -1891,7 +1891,7 @@
     2.4  
     2.5      int own = 0;
     2.6      if (!name[0]) {
     2.7 -        unsigned char uuid[16];
     2.8 +        pEpUUID uuid;
     2.9          uuid_generate_random(uuid);
    2.10          uuid_unparse_upper(uuid, name);
    2.11          own = 1;
     3.1 --- a/src/sync.c	Fri Oct 07 21:51:08 2016 +0200
     3.2 +++ b/src/sync.c	Fri Oct 07 22:04:07 2016 +0200
     3.3 @@ -26,7 +26,7 @@
     3.4      if (!(session && obj && messageToSend && showHandshake && inject_sync_msg && retrieve_next_sync_msg))
     3.5          return PEP_ILLEGAL_VALUE;
     3.6  
     3.7 -    unsigned char uuid[16];
     3.8 +    pEpUUID uuid;
     3.9      uuid_generate_random(uuid);
    3.10      uuid_unparse_upper(uuid, session->sync_uuid);
    3.11  
     4.1 --- a/src/sync_impl.c	Fri Oct 07 21:51:08 2016 +0200
     4.2 +++ b/src/sync_impl.c	Fri Oct 07 22:04:07 2016 +0200
     4.3 @@ -1,6 +1,9 @@
     4.4 +// it seems pEp_internal.h needs to be the first file due to the 
     4.5 +// #define for the dllimport / dllexport DYNAMIC_API stuff.
     4.6 +#include "pEp_internal.h"
     4.7 +
     4.8  #include "../asn.1/DeviceGroup-Protocol.h"
     4.9  #include "sync_impl.h"
    4.10 -#include "pEp_internal.h"
    4.11  #include "keymanagement.h"
    4.12  #include "message_api.h"
    4.13  #include "map_asn1.h"