Browse Source

Fixed warnings. Fixed 32/64 conversions

pull/2/merge
Hoa V. DINH 7 years ago
parent
commit
d03bc62ce1
4 changed files with 13 additions and 13 deletions
  1. +5
    -5
      src/data-types/mailstream_low.c
  2. +4
    -4
      src/low-level/imap/mailimap.c
  3. +2
    -2
      src/low-level/imap/mailimap_parser.c
  4. +2
    -2
      src/low-level/imap/mailimap_sender.c

+ 5
- 5
src/data-types/mailstream_low.c View File

@ -93,9 +93,9 @@ static inline void mailstream_logger_internal(mailstream_low * s, int is_stream_
f = fopen(LOG_FILE, "a"); \
umask(old_mask); \
if (f != NULL) { \
int nmemb; \
size_t nmemb; \
maillock_write_lock(LOG_FILE, fileno(f)); \
nmemb = fwrite((buf), 1, (size_t) (size), f); \
nmemb = fwrite((buf), 1, (size), f); \
maillock_write_unlock(LOG_FILE, fileno(f)); \
fclose(f); \
} \
@ -120,9 +120,9 @@ static inline void mailstream_logger_internal(mailstream_low * s, int is_stream_
f = fopen(LOG_FILE, "a"); \
umask(old_mask); \
if (f != NULL) { \
int nmemb; \
size_t nmemb; \
maillock_write_lock(LOG_FILE, fileno(f)); \
nmemb = fwrite((buf), 1, (size_t) (size), f); \
nmemb = fwrite((buf), 1, (size), f); \
maillock_write_unlock(LOG_FILE, fileno(f)); \
fclose(f); \
} \
@ -147,7 +147,7 @@ static inline void mailstream_logger_internal(mailstream_low * s, int is_stream_
f = fopen(LOG_FILE, "a"); \
umask(old_mask); \
if (f != NULL) { \
int nmemb; \
size_t nmemb; \
maillock_write_lock(LOG_FILE, fileno(f)); \
nmemb = fputs((str), f); \
maillock_write_unlock(LOG_FILE, fileno(f)); \


+ 4
- 4
src/low-level/imap/mailimap.c View File

@ -1551,14 +1551,14 @@ static int sasl_getsimple(void * context, int id,
if (result != NULL)
* result = session->imap_sasl.sasl_login;
if (len != NULL)
* len = strlen(session->imap_sasl.sasl_login);
* len = (unsigned) strlen(session->imap_sasl.sasl_login);
return SASL_OK;
case SASL_CB_AUTHNAME:
if (result != NULL)
* result = session->imap_sasl.sasl_auth_name;
if (len != NULL)
* len = strlen(session->imap_sasl.sasl_auth_name);
* len = (unsigned) strlen(session->imap_sasl.sasl_auth_name);
return SASL_OK;
}
@ -1741,12 +1741,12 @@ int mailimap_authenticate(mailimap * session, const char * auth_type,
}
if (got_response) {
size_t response_len;
unsigned int response_len;
char * decoded;
unsigned int decoded_len;
unsigned int max_decoded;
response_len = strlen(response_base64);
response_len = (unsigned int) strlen(response_base64);
max_decoded = response_len * 3 / 4;
decoded = malloc(max_decoded + 1);
if (decoded == NULL) {


+ 2
- 2
src/low-level/imap/mailimap_parser.c View File

@ -4400,7 +4400,7 @@ static int get_current_timezone_offset(void)
if (localtime_r(&t, &lt) == NULL)
return 0;
off = (mail_mkgmtime(&lt) - mail_mkgmtime(&gmt)) * 100 / (60 * 60);
off = (int) ((mail_mkgmtime(&lt) - mail_mkgmtime(&gmt)) * 100 / (60 * 60));
return off;
}
@ -5961,7 +5961,7 @@ static int mailimap_literal_parse_progress(mailstream * fd, MMAPString * buffer,
goto err;
}
left = buffer->len - cur_token;
left = (uint32_t) (buffer->len - cur_token);
if (left >= number) {
if (number > 0)


+ 2
- 2
src/low-level/imap/mailimap_sender.c View File

@ -2038,7 +2038,7 @@ static int mailimap_search_key_need_to_send_charset(struct mailimap_search_key *
return 0;
case MAILIMAP_SEARCH_KEY_XGMTHRID:
return !is_ascii(key->sk_data.sk_xgmthrid);
return 0;
case MAILIMAP_SEARCH_KEY_MULTIPLE:
{
@ -2069,7 +2069,7 @@ static int mailimap_search_key_need_to_send_charset(struct mailimap_search_key *
return 0;
case MAILIMAP_SEARCH_KEY_XGMMSGID:
return !is_ascii(key->sk_data.sk_xgmmsgid);
return 0;
default:
/* don't know, better send */


Loading…
Cancel
Save