Alexandre Julliard wrote:
ChangeSet ID: 6997 CVSROOT: /opt/cvs-commit Module name: wine Changes by: julliard@wine.codeweavers.com 2003/01/11 15:02:50
Modified files: programs/wineboot: wineboot.c Makefile.in
Log message: Shachar Shemesh wine-patches@sun.consumer.org.il Implemented the "pending rename" registry processing.
Patch: http://cvs.winehq.com/patch.py?id=6997
Old revision New revision Changes Path 1.2 1.3 +158 -3 wine/programs/wineboot/wineboot.c 1.1 1.2 +1 -1 wine/programs/wineboot/Makefile.in
Hi Alexander,
Two points about the differences between the version I submitted and the version that made it in.
1. If you are going to reject the printing of "Windows is finishing to install your programs..." closing message, at least also remove the starting message (lines 105 and 106 of version 1.3 of the file). 2. The reason I added the cast on the free line was to remove a compilation warning. If you made sure the warning doesn't happen by changing somewhere else in the code, that's, of course, fine. Otherwise there is a warning when compiling (I am currently doing a clean compile to make sure whether that happens on my system).
Shachar
Shachar Shemesh wrote:
- The reason I added the cast on the free line was to remove a compilation warning. If you made sure the warning doesn't happen by changing somewhere else in the code, that's, of course, fine. Otherwise there is a warning when compiling (I am currently doing a clean compile to make sure whether that happens on my system).
I hate replying to my own emails, but I realized that it was not clear where this warning came from. The problem is that buffer is defined as a "const WCHAR *", while free expects "void *". When trying to simply do "free(buffer)", the compiler complains about the removal of the "const" modifier from the call. Either change free to expect "const void *", or leave the cast as I placed it.
Shachar
On January 11, 2003 05:26 pm, Shachar Shemesh wrote:
The problem is that buffer is defined as a "const WCHAR *", while free expects "void *".
Change the var to WCHAR *, why would you free a const string without a warning?
Dimitrie O. Paun wrote:
On January 11, 2003 05:26 pm, Shachar Shemesh wrote:
The problem is that buffer is defined as a "const WCHAR *", while free expects "void *".
Change the var to WCHAR *, why would you free a const string without a warning?
My mistake after all. I wasn't thinking straight (does slight fever count as an excuse?). The var should be WCHAR *. I see it now - since the buffer was written to using RegQueryValueEx, and therefore required a cast to LPBYTE, I didn't catch this error. That is part of the reason Strastroup says casts are evil....
Do you want an official patch, or will you just remove the "const"?
Shachar
Shachar Shemesh wine-devel@sun.consumer.org.il writes:
Two points about the differences between the version I submitted and the version that made it in.
- If you are going to reject the printing of "Windows is finishing to install your programs..." closing message, at least also remove the starting message (lines 105 and 106 of version 1.3 of the
file).
I'm not opposed to having a message, but "continuing to boot wine" is very misleading to indicate the end of the app.
- The reason I added the cast on the free line was to remove a compilation warning. If you made sure the warning doesn't happen by changing somewhere else in the code, that's, of course, fine. Otherwise there is a warning when compiling (I am currently doing a clean compile to make sure whether that happens on my system).
If there's a warning it's because you are doing something wrong, you shouldn't need to cast pointers passed to free(). Actually I see it now, the buffer is const which doesn't make sense since we are writing to it. I'll fix it.
Alexandre Julliard wrote:
Shachar Shemesh wine-devel@sun.consumer.org.il writes:
Two points about the differences between the version I submitted and the version that made it in.
- If you are going to reject the printing of "Windows is finishing to install your programs..." closing message, at least also remove the starting message (lines 105 and 106 of version 1.3 of the
file).
I'm not opposed to having a message, but "continuing to boot wine" is very misleading to indicate the end of the app.
I only put these messages in because smilar messages appear on the original wininit.exe. Any of removing the messages altogether, moving the second message to the very end of wineboot (as opposed to the end of the wininit part, which is just a tiny part), or changing the wording is ok by me.
Shachar