+2013-05-04 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Address some GCC-4.7 string initialisation warnings.
+
+ * src/pkglist.cpp (AppWindowMaker::InitPackageListView): Declare all
+ headings[].text initialisers as 'const'; cast to 'char *' as required.
+ (pkgListViewMaker::Dispatch): Ditto, when inserting the 'const' empty
+ string into the list, as a component class value.
+
+ * src/pkgdata.cpp (AppWindowMaker::InitPackageTabControl): Declare all
+ TabLegend[] initialisers as 'const'; cast to 'char *' as required.
+
2013-05-02 Keith Marshall <keithmarshall@users.sourceforge.net>
Correct a spin wait thread synchronisation issue.
*/
TCITEM tab;
tab.mask = TCIF_TEXT;
- char *TabLegend[] =
+ const char *TabLegend[] =
{ "General", "Description", "Dependencies", "Installed Files", "Versions",
/* ...with a NULL sentinel marking the preceding label as
{
/* This loop assumes responsibility for actual tab creation...
*/
- tab.pszText = TabLegend[i];
+ tab.pszText = (char *)(TabLegend[i]);
if( TabCtrl_InsertItem( PackageTabControl, i, &tab ) == -1 )
{
/* ...bailing out, and deleting the container window,
/* Initialise the table layout, and assign column headings.
*/
LVCOLUMN table;
- struct { int id; int width; char *text; } headings[] =
+ struct { int id; int width; const char *text; } headings[] =
{
/* Specify the column headings for the package list table.
*/
* (in pixels), and assigning the heading to each.
*/
table.cx = headings[index].width;
- table.pszText = headings[index].text;
+ table.pszText = (char *)(headings[index].text);
ListView_InsertColumn( PackageListView, index, &table );
}
/* "Update" the package list, to initialise the list view.
/* ...otherwise, simply insert an unclassified list entry
* for the bare package name, omitting the component class.
*/
- InsertItem( package, "" );
+ InsertItem( package, (char *)("") );
}
else if( package->IsElementOfType( component_key ) )
{