User Activity

  • Posted a comment on discussion Development on cppcheck

    I encountered this problem with a code that I simplified a first time to the following (kinda close to what I was actually doing): void funk(char *str, bool ignorestr) { char buf[32], *p=buf; if (ignorestr) buf[0] = '\0'; // style: Variable 'buf[0]' is assigned a value that is never used. [unreadVariable] else p = str; puts(p); // but p can point to buf! } Then I thought a bit more and simplified even more the problem like this: and with the following code I still get the unreadVariable style warning...

  • Posted a comment on discussion Development on cppcheck

    The original code where I got this problem was when using the Win32 FormatMessage() function that can allocate a string via a double pointer that has to be casted to a LPTSTR. I tried first with cppcheck 2.10, then I build the latest 2.11 from source to test again. I am working on 32 bit windows. I was able to reproduce this problem with a very short C code. #include <stdio.h> void MallocAndFillBuf(uintptr_t buf); void funk() { char *buf=NULL; MallocAndFillBuf((uintptr_t)&buf); // buf may be modified...

  • Posted a comment on ticket #961 on MinGW-w64 - for 32 and 64 bit Windows

    After further investigation it seems I can get the program to work properly if I #undef the function names and write manually the full deceleration. the __impl_InterlockedIncrement is still in libkernel32.a modified example.c: #include <windows.h> #undef InterlockedExchange #undef InterlockedIncrement #undef InterlockedDecrement WINBASEAPI LONG WINAPI InterlockedExchange(LONG volatile *, LONG); WINBASEAPI LONG WINAPI InterlockedIncrement(LONG volatile *); WINBASEAPI LONG WINAPI InterlockedDecrement(LONG...

  • Created ticket #961 on MinGW-w64 - for 32 and 64 bit Windows

    InterlockedIncrement/Decrement() for Win32 i386 target

  • Created ticket #1584 on 7-Zip

    Use PROCESS_MODE_BACKGROUND_BEGIN Priority class on Windows vista and later

View All

Personal Data

Username:
ramonunch
Joined:
2022-09-05 10:23:10.774000

Projects

  • No projects to display.

Personal Tools