Mercurial > hg > freeDiameter
comparison libfdproto/dictionary_functions.c @ 1033:000e1904074c
Fix a number of additional warnings
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Tue, 16 Apr 2013 11:45:52 +0800 |
parents | e63de8d76916 |
children | 2f989d1a21e9 |
comparison
equal
deleted
inserted
replaced
1032:313c510b0d65 | 1033:000e1904074c |
---|---|
276 static int time_t_to_diameter_string(time_t time_stamp, char **result) { | 276 static int time_t_to_diameter_string(time_t time_stamp, char **result) { |
277 uint64_t out = time_stamp; | 277 uint64_t out = time_stamp; |
278 char *conv; | 278 char *conv; |
279 /* XXX: 2036 fix */ | 279 /* XXX: 2036 fix */ |
280 out += DIFF_EPOCH_TO_NTP; | 280 out += DIFF_EPOCH_TO_NTP; |
281 CHECK_PARAMS( (out & 0xffffffff00000000) == 0); | 281 CHECK_PARAMS( (out >> 32) == 0); |
282 | 282 |
283 CHECK_MALLOC(conv=(char *)malloc(5)); | 283 CHECK_MALLOC(conv=(char *)malloc(5)); |
284 | 284 |
285 conv[0] = (out>>24) & 0xff; | 285 conv[0] = (out>>24) & 0xff; |
286 conv[1] = (out>>16) & 0xff; | 286 conv[1] = (out>>16) & 0xff; |
311 { | 311 { |
312 TRACE_ENTRY("%p %p", avp_value, interpreted); | 312 TRACE_ENTRY("%p %p", avp_value, interpreted); |
313 | 313 |
314 CHECK_PARAMS( avp_value && interpreted ); | 314 CHECK_PARAMS( avp_value && interpreted ); |
315 | 315 |
316 return diameter_string_to_time_t(avp_value->os.data, avp_value->os.len, interpreted); | 316 return diameter_string_to_time_t((const char *)avp_value->os.data, avp_value->os.len, interpreted); |
317 } | 317 } |
318 | 318 |
319 char * fd_dictfct_Time_dump(union avp_value * avp_value) | 319 char * fd_dictfct_Time_dump(union avp_value * avp_value) |
320 { | 320 { |
321 char * ret; | 321 char * ret; |