Displaying 3 results from an estimated 3 matches for "chararray".
2016 Mar 16
4
Problem with __builtin_object_size when it depends on a condition
...izer doesn't know how to calculate the object size when it finds
condition that cannot be eliminated. There is example:
-----------------------------------------------
#include<stdlib.h>
#define STATIC_BUF_SIZE 10
#define LARGER_BUF_SIZE 30
size_t foo(int flag) {
char *cptr;
char chararray[LARGER_BUF_SIZE];
char chararray2[STATIC_BUF_SIZE];
if(flag)
cptr = chararray2;
else
cptr = chararray;
return __builtin_object_size(cptr, 2);
}
int main() {
size_t ret;
ret = foo(0);
printf("\n%d\n", ret);
return 0;
}
---------------------------------...
2016 Mar 17
3
Problem with __builtin_object_size when it depends on a condition
...on that cannot be eliminated. There is example:
>>
>> -----------------------------------------------
>> #include<stdlib.h>
>> #define STATIC_BUF_SIZE 10
>> #define LARGER_BUF_SIZE 30
>>
>> size_t foo(int flag) {
>> char *cptr;
>> char chararray[LARGER_BUF_SIZE];
>> char chararray2[STATIC_BUF_SIZE];
>> if(flag)
>> cptr = chararray2;
>> else
>> cptr = chararray;
>>
>> return __builtin_object_size(cptr, 2);
>> }
>>
>> int main() {
>> size_t ret;
>>...
2012 May 18
7
Dir.create_junction with FFI
Hi,
Try as I might, I just cannot get Dir.create_junction to work with FFI
in the ffi branch of the win32-dir project. The problem is the
REPARSE_JDATA_BUFFER struct. I''m just not sure how to set those
members, specifically, the PathBuffer member. The target looks good,
it''s UTF-16LE encoded, but I can''t make it work, despite trying
several ways of defining the struct,