msi: Remove tentative definition of static array with no size specifier
Andrew Talbot
andrew.talbot at talbotville.com
Wed Apr 2 17:07:55 CDT 2008
Whereas for a non-static array a tentative definition does not require a
size to be specified, for example:
char ar[]; /* tentative definition */
char ar[] = "hello"; /* actual definition */
strictly, when the static storage specifier is applied, the size must be
specified:
static char ar[5]; /* tentative definition */
static char ar[5] = "hello"; /* actual definition */
This patch avoids using a magic number by moving the definition of an array
and adding forward declarations for the functions affected, instead.
-- Andy.
---
Changelog:
msi: Remove tentative declaration of static array with no size specifier.
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 982c9f0..8cc36a0 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -47,6 +47,64 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
static UINT ACTION_ProcessExecSequence(MSIPACKAGE *package, BOOL UIran);
static UINT ACTION_ProcessUISequence(MSIPACKAGE *package);
static UINT ACTION_PerformActionSequence(MSIPACKAGE *package, UINT seq, BOOL UI);
+static UINT ACTION_AllocateRegistrySpace( MSIPACKAGE *package );
+static UINT ACTION_BindImage( MSIPACKAGE *package );
+static UINT ACTION_CostFinalize(MSIPACKAGE *package);
+static UINT ACTION_CostInitialize(MSIPACKAGE *package);
+static UINT ACTION_CreateFolders(MSIPACKAGE *package);
+static UINT ACTION_CreateShortcuts(MSIPACKAGE *package);
+static UINT ACTION_DeleteServices( MSIPACKAGE *package );
+static UINT ACTION_ExecuteAction(MSIPACKAGE *package);
+static UINT ACTION_FileCost(MSIPACKAGE *package);
+static UINT ACTION_InstallExecute(MSIPACKAGE *package);
+static UINT ACTION_InstallFinalize(MSIPACKAGE *package);
+static UINT ACTION_InstallInitialize(MSIPACKAGE *package);
+static UINT ACTION_InstallSFPCatalogFile( MSIPACKAGE *package );
+static UINT ACTION_InstallValidate(MSIPACKAGE *package);
+static UINT ACTION_IsolateComponents( MSIPACKAGE *package );
+static UINT ACTION_LaunchConditions(MSIPACKAGE *package);
+static UINT ACTION_MigrateFeatureStates( MSIPACKAGE *package );
+static UINT ACTION_MoveFiles( MSIPACKAGE *package );
+static UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package );
+static UINT ACTION_MsiUnpublishAssemblies( MSIPACKAGE *package );
+static UINT ACTION_InstallODBC( MSIPACKAGE *package );
+static UINT ACTION_InstallServices( MSIPACKAGE *package );
+static UINT ACTION_PatchFiles( MSIPACKAGE *package );
+static UINT ACTION_ProcessComponents(MSIPACKAGE *package);
+static UINT ACTION_PublishComponents(MSIPACKAGE *package);
+static UINT ACTION_PublishFeatures(MSIPACKAGE *package);
+static UINT ACTION_PublishProduct(MSIPACKAGE *package);
+static UINT ACTION_RegisterComPlus( MSIPACKAGE *package );
+static UINT ACTION_RegisterProduct(MSIPACKAGE *package);
+static UINT ACTION_RegisterTypeLibraries(MSIPACKAGE *package);
+static UINT ACTION_RegisterUser(MSIPACKAGE *package);
+static UINT ACTION_RemoveDuplicateFiles( MSIPACKAGE *package );
+static UINT ACTION_RemoveEnvironmentStrings( MSIPACKAGE *package );
+static UINT ACTION_RemoveExistingProducts( MSIPACKAGE *package );
+static UINT ACTION_RemoveFolders( MSIPACKAGE *package );
+static UINT ACTION_RemoveIniValues( MSIPACKAGE *package );
+static UINT ACTION_RemoveODBC( MSIPACKAGE *package );
+static UINT ACTION_RemoveRegistryValues( MSIPACKAGE *package );
+static UINT ACTION_RemoveShortcuts( MSIPACKAGE *package );
+static UINT ACTION_ResolveSource(MSIPACKAGE* package);
+static UINT ACTION_RMCCPSearch( MSIPACKAGE *package );
+static UINT ACTION_SelfRegModules(MSIPACKAGE *package);
+static UINT ACTION_SelfUnregModules( MSIPACKAGE *package );
+static UINT ACTION_StartServices( MSIPACKAGE *package );
+static UINT ACTION_StopServices( MSIPACKAGE *package );
+static UINT ACTION_UnpublishComponents( MSIPACKAGE *package );
+static UINT ACTION_UnpublishFeatures(MSIPACKAGE *package);
+static UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package );
+static UINT ACTION_UnregisterComPlus( MSIPACKAGE *package );
+static UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package );
+static UINT ACTION_UnregisterFonts( MSIPACKAGE *package );
+static UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package );
+static UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package );
+static UINT ACTION_UnregisterTypeLibraries( MSIPACKAGE *package );
+static UINT ACTION_ValidateProductID( MSIPACKAGE *package );
+static UINT ACTION_WriteEnvironmentStrings( MSIPACKAGE *package );
+static UINT ACTION_WriteIniValues(MSIPACKAGE *package);
+static UINT ACTION_WriteRegistryValues(MSIPACKAGE *package);
/*
* consts and values used
@@ -233,7 +291,84 @@ struct _actions {
STANDARDACTIONHANDLER handler;
};
-static const struct _actions StandardActions[];
+static const struct _actions StandardActions[] = {
+ { szAllocateRegistrySpace, ACTION_AllocateRegistrySpace },
+ { szAppSearch, ACTION_AppSearch },
+ { szBindImage, ACTION_BindImage },
+ { szCCPSearch, ACTION_CCPSearch },
+ { szCostFinalize, ACTION_CostFinalize },
+ { szCostInitialize, ACTION_CostInitialize },
+ { szCreateFolders, ACTION_CreateFolders },
+ { szCreateShortcuts, ACTION_CreateShortcuts },
+ { szDeleteServices, ACTION_DeleteServices },
+ { szDisableRollback, NULL },
+ { szDuplicateFiles, ACTION_DuplicateFiles },
+ { szExecuteAction, ACTION_ExecuteAction },
+ { szFileCost, ACTION_FileCost },
+ { szFindRelatedProducts, ACTION_FindRelatedProducts },
+ { szForceReboot, ACTION_ForceReboot },
+ { szInstallAdminPackage, NULL },
+ { szInstallExecute, ACTION_InstallExecute },
+ { szInstallExecuteAgain, ACTION_InstallExecute },
+ { szInstallFiles, ACTION_InstallFiles},
+ { szInstallFinalize, ACTION_InstallFinalize },
+ { szInstallInitialize, ACTION_InstallInitialize },
+ { szInstallSFPCatalogFile, ACTION_InstallSFPCatalogFile },
+ { szInstallValidate, ACTION_InstallValidate },
+ { szIsolateComponents, ACTION_IsolateComponents },
+ { szLaunchConditions, ACTION_LaunchConditions },
+ { szMigrateFeatureStates, ACTION_MigrateFeatureStates },
+ { szMoveFiles, ACTION_MoveFiles },
+ { szMsiPublishAssemblies, ACTION_MsiPublishAssemblies },
+ { szMsiUnpublishAssemblies, ACTION_MsiUnpublishAssemblies },
+ { szInstallODBC, ACTION_InstallODBC },
+ { szInstallServices, ACTION_InstallServices },
+ { szPatchFiles, ACTION_PatchFiles },
+ { szProcessComponents, ACTION_ProcessComponents },
+ { szPublishComponents, ACTION_PublishComponents },
+ { szPublishFeatures, ACTION_PublishFeatures },
+ { szPublishProduct, ACTION_PublishProduct },
+ { szRegisterClassInfo, ACTION_RegisterClassInfo },
+ { szRegisterComPlus, ACTION_RegisterComPlus},
+ { szRegisterExtensionInfo, ACTION_RegisterExtensionInfo },
+ { szRegisterFonts, ACTION_RegisterFonts },
+ { szRegisterMIMEInfo, ACTION_RegisterMIMEInfo },
+ { szRegisterProduct, ACTION_RegisterProduct },
+ { szRegisterProgIdInfo, ACTION_RegisterProgIdInfo },
+ { szRegisterTypeLibraries, ACTION_RegisterTypeLibraries },
+ { szRegisterUser, ACTION_RegisterUser },
+ { szRemoveDuplicateFiles, ACTION_RemoveDuplicateFiles },
+ { szRemoveEnvironmentStrings, ACTION_RemoveEnvironmentStrings },
+ { szRemoveExistingProducts, ACTION_RemoveExistingProducts },
+ { szRemoveFiles, ACTION_RemoveFiles },
+ { szRemoveFolders, ACTION_RemoveFolders },
+ { szRemoveIniValues, ACTION_RemoveIniValues },
+ { szRemoveODBC, ACTION_RemoveODBC },
+ { szRemoveRegistryValues, ACTION_RemoveRegistryValues },
+ { szRemoveShortcuts, ACTION_RemoveShortcuts },
+ { szResolveSource, ACTION_ResolveSource },
+ { szRMCCPSearch, ACTION_RMCCPSearch },
+ { szScheduleReboot, NULL },
+ { szSelfRegModules, ACTION_SelfRegModules },
+ { szSelfUnregModules, ACTION_SelfUnregModules },
+ { szSetODBCFolders, NULL },
+ { szStartServices, ACTION_StartServices },
+ { szStopServices, ACTION_StopServices },
+ { szUnpublishComponents, ACTION_UnpublishComponents },
+ { szUnpublishFeatures, ACTION_UnpublishFeatures },
+ { szUnregisterClassInfo, ACTION_UnregisterClassInfo },
+ { szUnregisterComPlus, ACTION_UnregisterComPlus },
+ { szUnregisterExtensionInfo, ACTION_UnregisterExtensionInfo },
+ { szUnregisterFonts, ACTION_UnregisterFonts },
+ { szUnregisterMIMEInfo, ACTION_UnregisterMIMEInfo },
+ { szUnregisterProgIdInfo, ACTION_UnregisterProgIdInfo },
+ { szUnregisterTypeLibraries, ACTION_UnregisterTypeLibraries },
+ { szValidateProductID, ACTION_ValidateProductID },
+ { szWriteEnvironmentStrings, ACTION_WriteEnvironmentStrings },
+ { szWriteIniValues, ACTION_WriteIniValues },
+ { szWriteRegistryValues, ACTION_WriteRegistryValues },
+ { NULL, NULL },
+};
/********************************************************
@@ -5769,82 +5904,3 @@ static UINT ACTION_UnregisterTypeLibraries( MSIPACKAGE *package )
static const WCHAR table[] = { 'T','y','p','e','L','i','b',0 };
return msi_unimplemented_action_stub( package, "UnregisterTypeLibraries", table );
}
-
-static const struct _actions StandardActions[] = {
- { szAllocateRegistrySpace, ACTION_AllocateRegistrySpace },
- { szAppSearch, ACTION_AppSearch },
- { szBindImage, ACTION_BindImage },
- { szCCPSearch, ACTION_CCPSearch },
- { szCostFinalize, ACTION_CostFinalize },
- { szCostInitialize, ACTION_CostInitialize },
- { szCreateFolders, ACTION_CreateFolders },
- { szCreateShortcuts, ACTION_CreateShortcuts },
- { szDeleteServices, ACTION_DeleteServices },
- { szDisableRollback, NULL },
- { szDuplicateFiles, ACTION_DuplicateFiles },
- { szExecuteAction, ACTION_ExecuteAction },
- { szFileCost, ACTION_FileCost },
- { szFindRelatedProducts, ACTION_FindRelatedProducts },
- { szForceReboot, ACTION_ForceReboot },
- { szInstallAdminPackage, NULL },
- { szInstallExecute, ACTION_InstallExecute },
- { szInstallExecuteAgain, ACTION_InstallExecute },
- { szInstallFiles, ACTION_InstallFiles},
- { szInstallFinalize, ACTION_InstallFinalize },
- { szInstallInitialize, ACTION_InstallInitialize },
- { szInstallSFPCatalogFile, ACTION_InstallSFPCatalogFile },
- { szInstallValidate, ACTION_InstallValidate },
- { szIsolateComponents, ACTION_IsolateComponents },
- { szLaunchConditions, ACTION_LaunchConditions },
- { szMigrateFeatureStates, ACTION_MigrateFeatureStates },
- { szMoveFiles, ACTION_MoveFiles },
- { szMsiPublishAssemblies, ACTION_MsiPublishAssemblies },
- { szMsiUnpublishAssemblies, ACTION_MsiUnpublishAssemblies },
- { szInstallODBC, ACTION_InstallODBC },
- { szInstallServices, ACTION_InstallServices },
- { szPatchFiles, ACTION_PatchFiles },
- { szProcessComponents, ACTION_ProcessComponents },
- { szPublishComponents, ACTION_PublishComponents },
- { szPublishFeatures, ACTION_PublishFeatures },
- { szPublishProduct, ACTION_PublishProduct },
- { szRegisterClassInfo, ACTION_RegisterClassInfo },
- { szRegisterComPlus, ACTION_RegisterComPlus},
- { szRegisterExtensionInfo, ACTION_RegisterExtensionInfo },
- { szRegisterFonts, ACTION_RegisterFonts },
- { szRegisterMIMEInfo, ACTION_RegisterMIMEInfo },
- { szRegisterProduct, ACTION_RegisterProduct },
- { szRegisterProgIdInfo, ACTION_RegisterProgIdInfo },
- { szRegisterTypeLibraries, ACTION_RegisterTypeLibraries },
- { szRegisterUser, ACTION_RegisterUser },
- { szRemoveDuplicateFiles, ACTION_RemoveDuplicateFiles },
- { szRemoveEnvironmentStrings, ACTION_RemoveEnvironmentStrings },
- { szRemoveExistingProducts, ACTION_RemoveExistingProducts },
- { szRemoveFiles, ACTION_RemoveFiles },
- { szRemoveFolders, ACTION_RemoveFolders },
- { szRemoveIniValues, ACTION_RemoveIniValues },
- { szRemoveODBC, ACTION_RemoveODBC },
- { szRemoveRegistryValues, ACTION_RemoveRegistryValues },
- { szRemoveShortcuts, ACTION_RemoveShortcuts },
- { szResolveSource, ACTION_ResolveSource },
- { szRMCCPSearch, ACTION_RMCCPSearch },
- { szScheduleReboot, NULL },
- { szSelfRegModules, ACTION_SelfRegModules },
- { szSelfUnregModules, ACTION_SelfUnregModules },
- { szSetODBCFolders, NULL },
- { szStartServices, ACTION_StartServices },
- { szStopServices, ACTION_StopServices },
- { szUnpublishComponents, ACTION_UnpublishComponents },
- { szUnpublishFeatures, ACTION_UnpublishFeatures },
- { szUnregisterClassInfo, ACTION_UnregisterClassInfo },
- { szUnregisterComPlus, ACTION_UnregisterComPlus },
- { szUnregisterExtensionInfo, ACTION_UnregisterExtensionInfo },
- { szUnregisterFonts, ACTION_UnregisterFonts },
- { szUnregisterMIMEInfo, ACTION_UnregisterMIMEInfo },
- { szUnregisterProgIdInfo, ACTION_UnregisterProgIdInfo },
- { szUnregisterTypeLibraries, ACTION_UnregisterTypeLibraries },
- { szValidateProductID, ACTION_ValidateProductID },
- { szWriteEnvironmentStrings, ACTION_WriteEnvironmentStrings },
- { szWriteIniValues, ACTION_WriteIniValues },
- { szWriteRegistryValues, ACTION_WriteRegistryValues },
- { NULL, NULL },
-};
More information about the wine-patches
mailing list