Opened 13 years ago

Closed 13 years ago

#1051 closed Enhancement (fixed)

[patch] some const* char warning to eliminate

Reported by: steffen_moeller Owned by:
Priority: Trivial Milestone: 7.0
Component: Undetermined Version: 6.12.16
Keywords: Cc:

Description

basically all versions up to 6.12.18

Hello, I am attaching one of the patches by the Debian/Ubuntu? folks that seems directly applicable. You had kindly accepted some later patches to other graphics before.

Cheers,

Steffen

Attachments (3)

FlatBookStaticChar.patch (3.6 KB) - added by steffen_moeller 13 years ago.
file from debian/patches .. adding "const" to xpm in .h file
AdvancedFrame_const.patch (877 bytes) - added by steffen_moeller 13 years ago.
const_cast for const char *
advanced_link_image_const.patch (552 bytes) - added by steffen_moeller 13 years ago.
Yet another XPM missing the "const"

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by steffen_moeller

Attachment: FlatBookStaticChar.patch added

file from debian/patches .. adding "const" to xpm in .h file

comment:1 Changed 13 years ago by steffen_moeller

Milestone: Undetermined6.12
Priority: UndeterminedTrivial
Type: DefectEnhancement

Changed 13 years ago by steffen_moeller

Attachment: AdvancedFrame_const.patch added

const_cast for const char *

comment:2 Changed 13 years ago by steffen_moeller

In run_program of lib/util.(cpp|h), the execution under linux is performed with the argv directly passed on via execv. That is expecting a "char *const argv[]" argument, which is very different from the "const char* const argv[]" that one would be expecting. While this grants execv some freedom for in situ modifications of that string passed as an argument, this is effectively just some historical compatibility with plain C (from http://stackoverflow.com/questions/190184/execv-and-const-ness). The attached patch fixes the usual const char* issue in the calling function of the BOINC manager.

Should you be looking this up, please also note that the Windows version will not test for the maximal path length to be exceeded in their strcat in util.cpp.

Changed 13 years ago by steffen_moeller

Yet another XPM missing the "const"

comment:3 Changed 13 years ago by romw

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.