From 20b701276c5cc40668d6c0c5bcbaf0c5259c33fa Mon Sep 17 00:00:00 2001
From: 15859157387 <977713017@qq.com>
Date: Mon, 11 Sep 2023 11:45:59 +0800
Subject: [PATCH] fix clang

---
 plugins/dynamic_simulator/new_sim.cpp       | 433 +-------------------
 plugins/dynamic_simulator/new_sim_file.cpp  |   4 +-
 plugins/ipmidirect/ipmi.cpp                 | 172 --------
 plugins/ipmidirect/t/sensor_factors_000.cpp |   2 +-
 plugins/ov_rest/ov_rest_re_discover.c       |   2 +-
 5 files changed, 5 insertions(+), 608 deletions(-)

diff --git a/plugins/dynamic_simulator/new_sim.cpp b/plugins/dynamic_simulator/new_sim.cpp
index 8fac6a4..6e6f9eb 100644
--- a/plugins/dynamic_simulator/new_sim.cpp
+++ b/plugins/dynamic_simulator/new_sim.cpp
@@ -3580,438 +3580,7 @@ static SaErrorT NewSimulatorSetResetState( void *hnd,
  * 
  */
 //@{
-extern "C" {
-
-/// Alias definition
-void * oh_open (GHashTable *, unsigned int, oh_evt_queue *) 
-                __attribute__ ((weak, alias("NewSimulatorOpen")));
-
-/// Alias definition
-void * oh_close (void *) __attribute__ ((weak, alias("NewSimulatorClose")));
-
-/// Alias definition
-void * oh_get_event (void *)
-                __attribute__ ((weak, alias("NewSimulatorGetEvent")));
-
-/// Alias definition
-void * oh_discover_resources (void *)
-                __attribute__ ((weak, alias("NewSimulatorDiscoverResources")));
-
-/// Alias definition
-void * oh_set_resource_tag (void *, SaHpiResourceIdT, SaHpiTextBufferT *)
-                __attribute__ ((weak, alias("NewSimulatorSetResourceTag")));
-
-/// Alias definition
-void * oh_set_resource_severity (void *, SaHpiResourceIdT, SaHpiSeverityT)
-                __attribute__ ((weak, alias("NewSimulatorSetResourceSeverity")));
-
-/// Alias definition
-void * oh_get_el_info (void *, SaHpiResourceIdT, SaHpiEventLogInfoT *)
-                __attribute__ ((weak, alias("NewSimulatorGetSelInfo")));
-
-/// Alias definition
-void * oh_set_el_time (void *, SaHpiResourceIdT, const SaHpiEventT *)
-                __attribute__ ((weak, alias("NewSimulatorSetSelTime")));
-
-/// Alias definition
-void * oh_add_el_entry (void *, SaHpiResourceIdT, const SaHpiEventT *)
-                __attribute__ ((weak, alias("NewSimulatorAddSelEntry")));
-
-/// Alias definition
-void * oh_get_el_entry (void *, SaHpiResourceIdT, SaHpiEventLogEntryIdT,
-                       SaHpiEventLogEntryIdT *, SaHpiEventLogEntryIdT *,
-                       SaHpiEventLogEntryT *, SaHpiRdrT *, SaHpiRptEntryT  *)
-                __attribute__ ((weak, alias("NewSimulatorGetSelEntry")));
-
-/// Alias definition
-void * oh_clear_el (void *, SaHpiResourceIdT)
-                __attribute__ ((weak, alias("NewSimulatorClearSel")));
-
-/// Alias definition
-void * oh_set_el_state (void *, SaHpiResourceIdT, SaHpiBoolT)
-		        __attribute__ ((weak, alias("NewSimulatorSetSelState")));
-
-/// Alias definition
-void * oh_get_el_state (void *, SaHpiResourceIdT, SaHpiBoolT *)
-		        __attribute__ ((weak, alias("NewSimulatorGetSelState")));
-
-/// Alias definition		        
-void * oh_get_el_caps (void *, SaHpiResourceIdT, SaHpiEventLogCapabilitiesT *)
-	            __attribute__ ((weak, alias("NewSimulatorGetSelCapability")));
-
-/// Alias definition
-void * oh_reset_el_overflow (void *, SaHpiResourceIdT)
-                __attribute__ ((weak, alias("NewSimulatorResetSelOverflow")));
-                
-/// Alias definition
-void * oh_get_sensor_reading (void *, SaHpiResourceIdT,
-                             SaHpiSensorNumT,
-                             SaHpiSensorReadingT *,
-                             SaHpiEventStateT    *)
-                __attribute__ ((weak, alias("NewSimulatorGetSensorReading")));
-
-/// Alias definition
-void * oh_get_sensor_thresholds (void *, SaHpiResourceIdT,
-                                 SaHpiSensorNumT,
-                                 SaHpiSensorThresholdsT *)
-                __attribute__ ((weak, alias("NewSimulatorGetSensorThresholds")));
-
-/// Alias definition
-void * oh_set_sensor_thresholds (void *, SaHpiResourceIdT,
-                                 SaHpiSensorNumT,
-                                 const SaHpiSensorThresholdsT *)
-                __attribute__ ((weak, alias("NewSimulatorSetSensorThresholds")));
-
-/// Alias definition
-void * oh_get_sensor_enable (void *, SaHpiResourceIdT,
-                             SaHpiSensorNumT,
-                             SaHpiBoolT *)
-                __attribute__ ((weak, alias("NewSimulatorGetSensorEnable")));
-
-/// Alias definition
-void * oh_set_sensor_enable (void *, SaHpiResourceIdT,
-                             SaHpiSensorNumT,
-                             SaHpiBoolT)
-                __attribute__ ((weak, alias("NewSimulatorSetSensorEnable")));
-
-/// Alias definition
-void * oh_get_sensor_event_enables (void *, SaHpiResourceIdT,
-                                    SaHpiSensorNumT,
-                                    SaHpiBoolT *)
-                __attribute__ ((weak, alias("NewSimulatorGetSensorEventEnables")));
-
-/// Alias definition
-void * oh_set_sensor_event_enables (void *, SaHpiResourceIdT id, SaHpiSensorNumT,
-                                    SaHpiBoolT *)
-                __attribute__ ((weak, alias("NewSimulatorSetSensorEventEnables")));
-
-/// Alias definition
-void * oh_get_sensor_event_masks (void *, SaHpiResourceIdT, SaHpiSensorNumT,
-                                  SaHpiEventStateT *, SaHpiEventStateT *)
-                __attribute__ ((weak, alias("NewSimulatorGetSensorEventMasks")));
-
-/// Alias definition
-void * oh_set_sensor_event_masks (void *, SaHpiResourceIdT, SaHpiSensorNumT,
-                                  SaHpiSensorEventMaskActionT,
-                                  SaHpiEventStateT,
-                                  SaHpiEventStateT)
-                __attribute__ ((weak, alias("NewSimulatorSetSensorEventMasks")));
-
-/// Alias definition
-void * oh_get_control_state (void *, SaHpiResourceIdT, SaHpiCtrlNumT,
-                             SaHpiCtrlModeT *, SaHpiCtrlStateT *)
-                __attribute__ ((weak, alias("NewSimulatorGetControlState")));
-
-/// Alias definition
-void * oh_set_control_state (void *, SaHpiResourceIdT,SaHpiCtrlNumT,
-                             SaHpiCtrlModeT, SaHpiCtrlStateT *)
-                __attribute__ ((weak, alias("NewSimulatorSetControlState")));
-
-/// Alias definition
-void * oh_get_idr_info (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiIdrInfoT *)
-                __attribute__ ((weak, alias("NewSimulatorGetIdrInfo")));
-
-/// Alias definition
-void * oh_get_idr_area_header (void *, SaHpiResourceIdT, SaHpiIdrIdT,
-                                SaHpiIdrAreaTypeT, SaHpiEntryIdT, SaHpiEntryIdT,
-                                SaHpiIdrAreaHeaderT)
-                __attribute__ ((weak, alias("NewSimulatorGetIdrAreaHeader")));
-
-/// Alias definition
-void * oh_add_idr_area (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiIdrAreaTypeT,
-                        SaHpiEntryIdT *)
-                __attribute__ ((weak, alias("NewSimulatorAddIdrArea")));
-
-/// Alias definition
-void * oh_add_idr_area_id (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiIdrAreaTypeT,
-                        SaHpiEntryIdT)
-                __attribute__ ((weak, alias("NewSimulatorAddIdrAreaById")));
-                
-/// Alias definition
-void * oh_del_idr_area (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiEntryIdT)
-                __attribute__ ((weak, alias("NewSimulatorDelIdrArea")));
-
-/// Alias definition
-void * oh_get_idr_field (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiEntryIdT,
-                         SaHpiIdrFieldTypeT, SaHpiEntryIdT, SaHpiEntryIdT,
-                         SaHpiIdrFieldT)
-                __attribute__ ((weak, alias("NewSimulatorGetIdrField")));
-
-/// Alias definition
-void * oh_add_idr_field (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiIdrFieldT *)
-                __attribute__ ((weak, alias("NewSimulatorAddIdrField")));
-
-/// Alias definition
-void * oh_add_idr_field_id (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiIdrFieldT *)
-                __attribute__ ((weak, alias("NewSimulatorAddIdrFieldById")));
-                
-/// Alias definition
-void * oh_set_idr_field (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiIdrFieldT)
-                __attribute__ ((weak, alias("NewSimulatorSetIdrField")));
-
-/// Alias definition
-void * oh_del_idr_field (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiEntryIdT,
-                         SaHpiEntryIdT)
-                __attribute__ ((weak, alias("NewSimulatorDelIdrField")));
-
-/// Alias definition
-void * oh_hotswap_policy_cancel (void *, SaHpiResourceIdT, SaHpiTimeoutT)
-                __attribute__ ((weak, alias("NewSimulatorHotswapPolicyCancel")));
-
-/// Alias definition
-void * oh_set_autoinsert_timeout (void *, SaHpiTimeoutT)
-                __attribute__ ((weak, alias("NewSimulatorSetAutoInsertTimeout")));
-
-/// Alias definition
-void * oh_get_autoextract_timeout (void *, SaHpiResourceIdT, SaHpiTimeoutT *)
-                __attribute__ ((weak, alias("NewSimulatorGetAutoExtractTimeout")));
-
-/// Alias definition
-void * oh_set_autoextract_timeout (void *, SaHpiResourceIdT, SaHpiTimeoutT)
-                __attribute__ ((weak, alias("NewSimulatorSetAutoExtractTimeout")));
-
-/// Alias definition
-void * oh_get_hotswap_state (void *, SaHpiResourceIdT, SaHpiHsStateT *)
-                __attribute__ ((weak, alias("NewSimulatorGetHotswapState")));
-
-/// Alias definition
-void * oh_set_hotswap_state (void *, SaHpiResourceIdT, SaHpiHsStateT)
-                __attribute__ ((weak, alias("NewSimulatorSetHotswapState")));
-
-/// Alias definition
-void * oh_request_hotswap_action (void *, SaHpiResourceIdT, SaHpiHsActionT)
-                __attribute__ ((weak, alias("NewSimulatorRequestHotswapAction")));
-
-
-/// Alias definition
-void * oh_get_power_state (void *, SaHpiResourceIdT, SaHpiPowerStateT *)
-                __attribute__ ((weak, alias("NewSimulatorGetPowerState")));
-
-/// Alias definition
-void * oh_set_power_state (void *, SaHpiResourceIdT, SaHpiPowerStateT)
-                __attribute__ ((weak, alias("NewSimulatorSetPowerState")));
-
-/// Alias definition
-void * oh_get_indicator_state (void *, SaHpiResourceIdT,
-                               SaHpiHsIndicatorStateT *)
-                __attribute__ ((weak, alias("NewSimulatorGetIndicatorState")));
-
-/// Alias definition
-void * oh_set_indicator_state (void *, SaHpiResourceIdT,
-                               SaHpiHsIndicatorStateT)
-                __attribute__ ((weak, alias("NewSimulatorSetIndicatorState")));
-
-/// Alias definition
-void * oh_control_parm (void *, SaHpiResourceIdT, SaHpiParmActionT)
-                __attribute__ ((weak, alias("NewSimulatorControlParm")));
-
-/// Alias definition
-void * oh_get_reset_state (void *, SaHpiResourceIdT, SaHpiResetActionT *)
-                __attribute__ ((weak, alias("NewSimulatorGetResetState")));
-
-/// Alias definition
-void * oh_set_reset_state (void *, SaHpiResourceIdT, SaHpiResetActionT)
-                __attribute__ ((weak, alias("NewSimulatorSetResetState")));
-
-/// Alias definition
-void * oh_get_watchdog_info (void *, SaHpiResourceIdT, SaHpiWatchdogNumT,
-                             SaHpiWatchdogT *)
-                __attribute__ ((weak, alias("NewSimulatorGetWatchdogInfo")));
-
-/// Alias definition
-void * oh_set_watchdog_info (void *, SaHpiResourceIdT, SaHpiWatchdogNumT,
-                             SaHpiWatchdogT *)
-                __attribute__ ((weak, alias("NewSimulatorSetWatchdogInfo")));
-
-/// Alias definition
-void * oh_reset_watchdog (void *, SaHpiResourceIdT , SaHpiWatchdogNumT )
-                __attribute__ ((weak, alias("NewSimulatorResetWatchdog")));
-
-/// Alias definition
-void * oh_get_next_announce(void *, SaHpiResourceIdT, SaHpiAnnunciatorNumT, 
-                            SaHpiSeverityT, SaHpiBoolT, SaHpiAnnouncementT *)
-               __attribute__ ((weak, alias("NewSimulatorGetNextAnnouncement")));
-
-/// Alias definition       
-void * oh_get_announce(void *, SaHpiResourceIdT, SaHpiAnnunciatorNumT, 
-                        SaHpiEntryIdT, SaHpiAnnouncementT *)
-               __attribute__ ((weak, alias("NewSimulatorGetAnnouncement")));
-
-/// Alias definition
-void * oh_ack_announce(void *, SaHpiResourceIdT, SaHpiAnnunciatorNumT, 
-                        SaHpiEntryIdT, SaHpiSeverityT)
-               __attribute__ ((weak, alias("NewSimulatorAckAnnouncement")));
-
-/// Alias definition              
-void * oh_add_announce(void *, SaHpiResourceIdT, SaHpiAnnunciatorNumT, 
-                        SaHpiAnnouncementT *)
-               __attribute__ ((weak, alias("NewSimulatorAddAnnouncement")));
-
-/// Alias definition
-void * oh_del_announce(void *, SaHpiResourceIdT, SaHpiAnnunciatorNumT, 
-                        SaHpiEntryIdT, SaHpiSeverityT)
-               __attribute__ ((weak, alias("NewSimulatorDelAnnouncement")));
-
-/// Alias definition             
-void * oh_get_annunc_mode(void *, SaHpiResourceIdT, SaHpiAnnunciatorNumT,
-                          SaHpiAnnunciatorModeT *)
-               __attribute__ ((weak, alias("NewSimulatorGetAnnMode")));
-
-/// Alias definition               
-void * oh_set_annunc_mode(void *, SaHpiResourceIdT, SaHpiAnnunciatorNumT,
-                          SaHpiAnnunciatorModeT)
-               __attribute__ ((weak, alias("NewSimulatorSetAnnMode")));
-
-/// Alias definition               
-void * oh_get_fumi_spec(void *, SaHpiResourceIdT, SaHpiFumiNumT, 
-                         SaHpiFumiSpecInfoT *)
-               __attribute__ ((weak, alias("NewSimulatorGetFumiSpec")));
-
-/// Alias definition               
-void * oh_get_fumi_service_impact(void *, SaHpiResourceIdT, SaHpiFumiNumT, 
-                                  SaHpiFumiServiceImpactDataT *)
-               __attribute__ ((weak, alias("NewSimulatorGetFumiServImpact")));
-
-/// Alias definition               
-void * oh_set_fumi_source(void *, SaHpiResourceIdT, SaHpiFumiNumT, 
-                          SaHpiBankNumT, SaHpiTextBufferT *)
-               __attribute__ ((weak, alias("NewSimulatorSetFumiSource")));
-
-/// Alias definition               
-void * oh_validate_fumi_source(void *, SaHpiResourceIdT, SaHpiFumiNumT, SaHpiBankNumT)
-               __attribute__ ((weak, alias("NewSimulatorValidateFumiSource")));
-                              
-/// Alias definition               
-void * oh_get_fumi_source(void *, SaHpiResourceIdT, SaHpiFumiNumT, SaHpiBankNumT,
-                           SaHpiFumiSourceInfoT *)
-               __attribute__ ((weak, alias("NewSimulatorGetFumiSource")));
-
-/// Alias definition               
-void * oh_get_fumi_source_component(void *, SaHpiResourceIdT, SaHpiFumiNumT, 
-                                    SaHpiBankNumT, SaHpiEntryIdT,
-                                    SaHpiEntryIdT *, SaHpiFumiComponentInfoT *)
-               __attribute__ ((weak, alias("NewSimulatorGetFumiSourceComponent")));
-
-/// Alias definition               
-void * oh_get_fumi_target(void *, SaHpiResourceIdT, SaHpiFumiNumT, 
-                           SaHpiBankNumT, SaHpiFumiBankInfoT *)
-               __attribute__ ((weak, alias("NewSimulatorGetFumiTarget")));
-               
-/// Alias definition               
-void * oh_get_fumi_target_component(void *, SaHpiResourceIdT, SaHpiFumiNumT, 
-                                    SaHpiBankNumT, SaHpiEntryIdT,
-                                    SaHpiEntryIdT *, SaHpiFumiComponentInfoT *)
-               __attribute__ ((weak, alias("NewSimulatorGetFumiTargetComponent")));   
-
-/// Alias definition               
-void * oh_get_fumi_logical_target(void *, SaHpiResourceIdT, SaHpiFumiNumT, 
-                                   SaHpiFumiLogicalBankInfoT *)
-               __attribute__ ((weak, alias("NewSimulatorGetFumiLogicalTarget")));
-
-/// Alias definition               
-void * oh_get_fumi_logical_target_component(void *, SaHpiResourceIdT, SaHpiFumiNumT,
-                                             SaHpiEntryIdT, SaHpiEntryIdT *, 
-                                             SaHpiFumiLogicalComponentInfoT *)
-               __attribute__ ((weak, alias("NewSimulatorGetFumiLogicalTargetComponent")));
-
-/// Alias definition               
-void * oh_start_fumi_backup(void *, SaHpiResourceIdT, SaHpiFumiNumT)
-               __attribute__ ((weak, alias("NewSimulatorStartFumiBackup")));
-
-/// Alias definition               
-void * oh_set_fumi_bank_order(void *, SaHpiResourceIdT, SaHpiFumiNumT,
-                               SaHpiBankNumT, SaHpiUint32T)
-               __attribute__ ((weak, alias("NewSimulatorSetFumiBankOrder")));
-
-/// Alias definition               
-void * oh_start_fumi_bank_copy(void *, SaHpiResourceIdT, SaHpiFumiNumT,
-                                SaHpiBankNumT, SaHpiBankNumT)
-               __attribute__ ((weak, alias("NewSimulatorStartFumiBankCopy")));
-
-/// Alias definition               
-void * oh_start_fumi_install(void *, SaHpiResourceIdT, SaHpiFumiNumT, SaHpiBankNumT)
-               __attribute__ ((weak, alias("NewSimulatorStartFumiInstall")));
-
-/// Alias definition               
-void * oh_get_fumi_status(void *, SaHpiResourceIdT, SaHpiFumiNumT, SaHpiBankNumT,
-                           SaHpiFumiUpgradeStatusT *)
-               __attribute__ ((weak, alias("NewSimulatorGetFumiStatus")));
-
-/// Alias definition               
-void * oh_start_fumi_verify(void *, SaHpiResourceIdT, SaHpiFumiNumT, SaHpiBankNumT)
-               __attribute__ ((weak, alias("NewSimulatorStartFumiVerification")));
-
-/// Alias definition               
-void * oh_start_fumi_verify_main(void *, SaHpiResourceIdT, SaHpiFumiNumT)
-               __attribute__ ((weak, alias("NewSimulatorStartFumiVerificationMain")));
-
-/// Alias definition               
-void * oh_cancel_fumi_upgrade(void *, SaHpiResourceIdT, SaHpiFumiNumT, SaHpiBankNumT)
-               __attribute__ ((weak, alias("NewSimulatorCancelFumiUpgrade")));
-
-/// Alias definition
-void * oh_get_fumi_autorollback_disable(void *, SaHpiResourceIdT, SaHpiFumiNumT, 
-                                         SaHpiBoolT *)
-               __attribute__ ((weak, alias("NewSimulatorGetFumiRollback")));
-
-/// Alias definition
-void * oh_set_fumi_autorollback_disable(void *, SaHpiResourceIdT, SaHpiFumiNumT, 
-                                         SaHpiBoolT)
-               __attribute__ ((weak, alias("NewSimulatorSetFumiRollback")));
-
-/// Alias definition
-void * oh_start_fumi_rollback(void *, SaHpiResourceIdT, SaHpiFumiNumT)
-               __attribute__ ((weak, alias("NewSimulatorStartFumiRollback")));
-
-/// Alias definition
-void * oh_activate_fumi(void *, SaHpiResourceIdT, SaHpiFumiNumT)
-               __attribute__ ((weak, alias("NewSimulatorActivateFumi")));
-
-/// Alias definition
-void * oh_start_fumi_activate(void *, SaHpiResourceIdT, SaHpiFumiNumT, SaHpiBoolT)
-               __attribute__ ((weak, alias("NewSimulatorStartFumiActivation")));
-
-/// Alias definition
-void * oh_cleanup_fumi(void *, SaHpiResourceIdT, SaHpiFumiNumT, SaHpiBankNumT)
-               __attribute__ ((weak, alias("NewSimulatorCleanupFumi")));
-
-/// Alias definition
-void * oh_get_dimi_info(void *, SaHpiResourceIdT, SaHpiDimiNumT, SaHpiDimiInfoT *)
-               __attribute__ ((weak, alias("NewSimulatorGetDimiInfo")));
-
-/// Alias definition
-void * oh_get_dimi_test(void *, SaHpiResourceIdT, SaHpiDimiNumT,
-                         SaHpiDimiTestNumT, SaHpiDimiTestT *)
-               __attribute__ ((weak, alias("NewSimulatorGetDimiTestInfo")));
-
-/// Alias definition
-void * oh_get_dimi_test_ready(void *, SaHpiResourceIdT, SaHpiDimiNumT,
-                               SaHpiDimiTestNumT, SaHpiDimiReadyT *)
-               __attribute__ ((weak, alias("NewSimulatorGetDimiTestReadiness")));
-
-/// Alias definition
-void * oh_start_dimi_test(void *, SaHpiResourceIdT, SaHpiDimiNumT, SaHpiDimiTestNumT,
-                           SaHpiUint8T, SaHpiDimiTestVariableParamsT *)
-               __attribute__ ((weak, alias("NewSimulatorStartDimiTest")));
-
-/// Alias definition
-void * oh_cancel_dimi_test(void *, SaHpiResourceIdT, SaHpiDimiNumT, 
-                            SaHpiDimiTestNumT)
-               __attribute__ ((weak, alias("NewSimulatorCancelDimiTest")));
-
-/// Alias definition
-void * oh_get_dimi_test_status(void *, SaHpiResourceIdT, SaHpiDimiNumT, 
-                                SaHpiDimiTestNumT, 
-                                SaHpiDimiTestPercentCompletedT *,
-                                SaHpiDimiTestRunStatusT *)
-               __attribute__ ((weak, alias("NewSimulatorGetDimiTestStatus")));
-               
-/// Alias definition
-void * oh_get_dimi_test_results(void *, SaHpiResourceIdT, SaHpiDimiNumT, 
-                                 SaHpiDimiTestNumT, SaHpiDimiTestResultsT *)
-               __attribute__ ((weak, alias("NewSimulatorGetDimiTestResults")));
-
-}               
+           
 //@}
 
 
diff --git a/plugins/dynamic_simulator/new_sim_file.cpp b/plugins/dynamic_simulator/new_sim_file.cpp
index e36c899..364df59 100644
--- a/plugins/dynamic_simulator/new_sim_file.cpp
+++ b/plugins/dynamic_simulator/new_sim_file.cpp
@@ -44,9 +44,9 @@
 ///< Global skip characters for oh_scanner_config
 static gchar skip_characters[] = " \t\n";  
 ///< Global identifier_first for oh_scanner_config
-static gchar identifier_first[] = G_CSET_a_2_z"_/."G_CSET_A_2_Z; 
+static gchar identifier_first[] = G_CSET_a_2_z"_/." G_CSET_A_2_Z;
 ///< Global identifier_nth for oh_scanner_config
-static gchar identifier_nth[] = G_CSET_a_2_z"_-0123456789/."G_CSET_A_2_Z;
+static gchar identifier_nth[] = G_CSET_a_2_z"_-0123456789/." G_CSET_A_2_Z;
 ///< Global comment signs for oh_scanner_config
 static gchar comment_single[] = "#\n";
 
diff --git a/plugins/ipmidirect/ipmi.cpp b/plugins/ipmidirect/ipmi.cpp
index f6745cf..03d01f3 100644
--- a/plugins/ipmidirect/ipmi.cpp
+++ b/plugins/ipmidirect/ipmi.cpp
@@ -1556,178 +1556,6 @@ IpmiResetWatchdog(void *hnd,
 
 } // new plugin_loader
 
-extern "C" {
-
-void * oh_open (GHashTable *, unsigned int, oh_evt_queue *) __attribute__ ((weak, alias("IpmiOpen")));
-
-void * oh_close (void *) __attribute__ ((weak, alias("IpmiClose")));
-
-void * oh_get_event (void *)
-                __attribute__ ((weak, alias("IpmiGetEvent")));
-
-void * oh_discover_resources (void *)
-                __attribute__ ((weak, alias("IpmiDiscoverResources")));
-
-void * oh_set_resource_tag (void *, SaHpiResourceIdT, SaHpiTextBufferT *)
-                __attribute__ ((weak, alias("IpmiSetResourceTag")));
-
-void * oh_set_resource_severity (void *, SaHpiResourceIdT, SaHpiSeverityT)
-                __attribute__ ((weak, alias("IpmiSetResourceSeverity")));
-
-void * oh_get_el_info (void *, SaHpiResourceIdT, SaHpiEventLogInfoT *)
-                __attribute__ ((weak, alias("IpmiGetSelInfo")));
-
-void * oh_set_el_time (void *, SaHpiResourceIdT, const SaHpiEventT *)
-                __attribute__ ((weak, alias("IpmiSetSelTime")));
-
-void * oh_add_el_entry (void *, SaHpiResourceIdT, const SaHpiEventT *)
-                __attribute__ ((weak, alias("IpmiAddSelEntry")));
-
-void * oh_get_el_entry (void *, SaHpiResourceIdT, SaHpiEventLogEntryIdT,
-                       SaHpiEventLogEntryIdT *, SaHpiEventLogEntryIdT *,
-                       SaHpiEventLogEntryT *, SaHpiRdrT *, SaHpiRptEntryT  *)
-                __attribute__ ((weak, alias("IpmiGetSelEntry")));
-
-void * oh_clear_el (void *, SaHpiResourceIdT)
-                __attribute__ ((weak, alias("IpmiClearSel")));
-
-void * oh_get_sensor_reading (void *, SaHpiResourceIdT,
-                             SaHpiSensorNumT,
-                             SaHpiSensorReadingT *,
-                             SaHpiEventStateT    *)
-                __attribute__ ((weak, alias("IpmiGetSensorReading")));
-
-void * oh_get_sensor_thresholds (void *, SaHpiResourceIdT,
-                                 SaHpiSensorNumT,
-                                 SaHpiSensorThresholdsT *)
-                __attribute__ ((weak, alias("IpmiGetSensorThresholds")));
-
-void * oh_set_sensor_thresholds (void *, SaHpiResourceIdT,
-                                 SaHpiSensorNumT,
-                                 const SaHpiSensorThresholdsT *)
-                __attribute__ ((weak, alias("IpmiSetSensorThresholds")));
-
-void * oh_get_sensor_enable (void *, SaHpiResourceIdT,
-                             SaHpiSensorNumT,
-                             SaHpiBoolT *)
-                __attribute__ ((weak, alias("IpmiGetSensorEnable")));
-
-void * oh_set_sensor_enable (void *, SaHpiResourceIdT,
-                             SaHpiSensorNumT,
-                             SaHpiBoolT)
-                __attribute__ ((weak, alias("IpmiSetSensorEnable")));
-
-void * oh_get_sensor_event_enables (void *, SaHpiResourceIdT,
-                                    SaHpiSensorNumT,
-                                    SaHpiBoolT *)
-                __attribute__ ((weak, alias("IpmiGetSensorEventEnables")));
-
-void * oh_set_sensor_event_enables (void *, SaHpiResourceIdT id, SaHpiSensorNumT,
-                                    SaHpiBoolT *)
-                __attribute__ ((weak, alias("IpmiSetSensorEventEnables")));
-
-void * oh_get_sensor_event_masks (void *, SaHpiResourceIdT, SaHpiSensorNumT,
-                                  SaHpiEventStateT *, SaHpiEventStateT *)
-                __attribute__ ((weak, alias("IpmiGetSensorEventMasks")));
-
-void * oh_set_sensor_event_masks (void *, SaHpiResourceIdT, SaHpiSensorNumT,
-                                  SaHpiSensorEventMaskActionT,
-                                  SaHpiEventStateT,
-                                  SaHpiEventStateT)
-                __attribute__ ((weak, alias("IpmiSetSensorEventMasks")));
-
-void * oh_get_control_state (void *, SaHpiResourceIdT, SaHpiCtrlNumT,
-                             SaHpiCtrlModeT *, SaHpiCtrlStateT *)
-                __attribute__ ((weak, alias("IpmiGetControlState")));
-
-void * oh_set_control_state (void *, SaHpiResourceIdT,SaHpiCtrlNumT,
-                             SaHpiCtrlModeT, SaHpiCtrlStateT *)
-                __attribute__ ((weak, alias("IpmiSetControlState")));
-
-void * oh_get_idr_info (void *hnd, SaHpiResourceIdT, SaHpiIdrIdT,SaHpiIdrInfoT)
-                __attribute__ ((weak, alias("IpmiGetIdrInfo")));
-
-void * oh_get_idr_area_header (void *, SaHpiResourceIdT, SaHpiIdrIdT,
-                                SaHpiIdrAreaTypeT, SaHpiEntryIdT, SaHpiEntryIdT,
-                                SaHpiIdrAreaHeaderT)
-                __attribute__ ((weak, alias("IpmiGetIdrAreaHeader")));
-
-void * oh_add_idr_area (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiIdrAreaTypeT,
-                        SaHpiEntryIdT)
-                __attribute__ ((weak, alias("IpmiAddIdrArea")));
-
-void * oh_del_idr_area (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiEntryIdT)
-                __attribute__ ((weak, alias("IpmiDelIdrArea")));
-
-void * oh_get_idr_field (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiEntryIdT,
-                         SaHpiIdrFieldTypeT, SaHpiEntryIdT, SaHpiEntryIdT,
-                         SaHpiIdrFieldT)
-                __attribute__ ((weak, alias("IpmiGetIdrField")));
-
-void * oh_add_idr_field (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiIdrFieldT)
-                __attribute__ ((weak, alias("IpmiAddIdrField")));
-
-void * oh_set_idr_field (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiIdrFieldT)
-                __attribute__ ((weak, alias("IpmiSetIdrField")));
-
-void * oh_del_idr_field (void *, SaHpiResourceIdT, SaHpiIdrIdT, SaHpiEntryIdT,
-                         SaHpiEntryIdT)
-                __attribute__ ((weak, alias("IpmiDelIdrField")));
-
-void * oh_hotswap_policy_cancel (void *, SaHpiResourceIdT, SaHpiTimeoutT)
-                __attribute__ ((weak, alias("IpmiHotswapPolicyCancel")));
-
-void * oh_set_autoinsert_timeout (void *, SaHpiTimeoutT)
-                __attribute__ ((weak, alias("IpmiSetAutoInsertTimeout")));
-
-void * oh_get_autoextract_timeout (void *, SaHpiResourceIdT, SaHpiTimeoutT *)
-                __attribute__ ((weak, alias("IpmiGetAutoExtractTimeout")));
-
-void * oh_set_autoextract_timeout (void *, SaHpiResourceIdT, SaHpiTimeoutT)
-                __attribute__ ((weak, alias("IpmiSetAutoExtractTimeout")));
-
-void * oh_get_hotswap_state (void *, SaHpiResourceIdT, SaHpiHsStateT *)
-                __attribute__ ((weak, alias("IpmiGetHotswapState")));
-
-void * oh_set_hotswap_state (void *, SaHpiResourceIdT, SaHpiHsStateT)
-                __attribute__ ((weak, alias("IpmiSetHotswapState")));
-
-void * oh_request_hotswap_action (void *, SaHpiResourceIdT, SaHpiHsActionT)
-                __attribute__ ((weak, alias("IpmiRequestHotswapAction")));
-
-void * oh_get_power_state (void *, SaHpiResourceIdT, SaHpiPowerStateT *)
-                __attribute__ ((weak, alias("IpmiGetPowerState")));
-
-void * oh_set_power_state (void *, SaHpiResourceIdT, SaHpiPowerStateT)
-                __attribute__ ((weak, alias("IpmiSetPowerState")));
-
-void * oh_get_indicator_state (void *, SaHpiResourceIdT,
-                               SaHpiHsIndicatorStateT *)
-                __attribute__ ((weak, alias("IpmiGetIndicatorState")));
-
-void * oh_set_indicator_state (void *, SaHpiResourceIdT,
-                               SaHpiHsIndicatorStateT)
-                __attribute__ ((weak, alias("IpmiSetIndicatorState")));
-
-void * oh_control_parm (void *, SaHpiResourceIdT, SaHpiParmActionT)
-                __attribute__ ((weak, alias("IpmiControlParm")));
-
-void * oh_get_reset_state (void *, SaHpiResourceIdT, SaHpiResetActionT *)
-                __attribute__ ((weak, alias("IpmiGetResetState")));
-
-void * oh_set_reset_state (void *, SaHpiResourceIdT, SaHpiResetActionT)
-                __attribute__ ((weak, alias("IpmiSetResetState")));
-
-void * oh_get_watchdog_info (void *, SaHpiResourceIdT, SaHpiWatchdogNumT,
-                             SaHpiWatchdogT *)
-                __attribute__ ((weak, alias("IpmiGetWatchdogInfo")));
-void * oh_set_watchdog_info (void *, SaHpiResourceIdT, SaHpiWatchdogNumT,
-                             SaHpiWatchdogT *)
-                __attribute__ ((weak, alias("IpmiSetWatchdogInfo")));
-void * oh_reset_watchdog (void *, SaHpiResourceIdT , SaHpiWatchdogNumT )
-                __attribute__ ((weak, alias("IpmiResetWatchdog")));
-}
-
 
 static unsigned int
 GetIntNotNull( GHashTable *handler_config, const char *str, unsigned int def = 0 )
diff --git a/plugins/ipmidirect/t/sensor_factors_000.cpp b/plugins/ipmidirect/t/sensor_factors_000.cpp
index 99ffa05..93f2387 100644
--- a/plugins/ipmidirect/t/sensor_factors_000.cpp
+++ b/plugins/ipmidirect/t/sensor_factors_000.cpp
@@ -63,7 +63,7 @@ static cIpmiSdr sdr =
     dB & 0xff,
     ((dB >> 2) & 0xc0) | (dAccuracy & 0x3f),
     ((dAccuracy >> 2) & 0xf0) | ((dAccuracyExp << 2) & 0x0c),
-    ((dRExp << 4) & 0xf0) | (dBExp & 0x0f ),
+    static_cast<unsigned char>(((dRExp << 4) & 0xf0) | (dBExp & 0x0f )),
     0,
     0,
   }
diff --git a/plugins/ov_rest/ov_rest_re_discover.c b/plugins/ov_rest/ov_rest_re_discover.c
index 5ad5427..7cdd13d 100644
--- a/plugins/ov_rest/ov_rest_re_discover.c
+++ b/plugins/ov_rest/ov_rest_re_discover.c
@@ -704,7 +704,7 @@ SaErrorT remove_composer(struct oh_handler_state *handler,
 		byte bayNumber)
 {
 
-        SaErrorT rv = NULL;
+        SaErrorT rv = 0;
         SaHpiResourceIdT resource_id = 0;
         struct oh_event event = {0};
 	struct ovRestHotswapState *hotswap_state = NULL;
-- 
2.27.0

