search for: buffer_get_modifiable_data

Displaying 3 results from an estimated 3 matches for "buffer_get_modifiable_data".

2009 Oct 27
1
dovecot-2.0.alpha2 doesn't compile on Mac OS X
...ray.h: --- a/src/lib/array.h 2009-10-08 10:04:35.000000000 -0500 +++ b/src/lib/array.h 2009-10-27 10:35:58.000000000 -0500 @@ -72,7 +72,7 @@ (elem)++) # define array_foreach_modifiable(array, elem) \ for (elem = ARRAY_TYPE_CAST_MODIFIABLE(array) \ - buffer_get_modifiable_data((array)- >arr.buffer, NULL)) + \ + buffer_get_modifiable_data((array)->arr.buffer, NULL) + \ (array)->arr.buffer->used; \ elem != CONST_PTR_OFFSET(*(array)->v, (array)->arr.buffer- >used); \ (elem)++) Second, Mac OS X can't link...
2012 Apr 20
1
array code issue ?
Hi, I just took a look into the dovecot 2.1 sources and just saw a possible issue in array.h. This code snippet as an example: #static inline void * #array_get_modifiable_i(struct array *array, unsigned int *count_r) #{ # *count_r = array->buffer->used / array->element_size; # return buffer_get_modifiable_data(array->buffer, NULL); #} array->buffer->used and array->element_size are of type 'size_t' which is 64bit on amd64 and others while 'count_r' is a 32bit value. At least, I see ugly warnings with -Wconversion (which I personally like to use). I know, it is unlikely tha...
2009 Oct 30
2
More dovecot-2.0.alpha2 problems
...sn't crash: --- dovecot-2.0.alpha2/src/lib/array.h 2009-10-08 10:04:35.000000000 -0500 +++ dovecot/src/lib/array.h 2009-10-29 20:47:47.000000000 -0500 @@ -72,8 +72,7 @@ (elem)++) # define array_foreach_modifiable(array, elem) \ for (elem = ARRAY_TYPE_CAST_MODIFIABLE(array) \ - buffer_get_modifiable_data((array)->arr.buffer, NULL)) + \ - (array)->arr.buffer->used; \ + buffer_get_modifiable_data((array)->arr.buffer, NULL); \ elem != CONST_PTR_OFFSET(*(array)->v, (array)->arr.buffer- >used); \ (elem)++) #endif 2. Sometimes I see a flood of these errors i...