diff --git a/frameworks/capi/battery_info/ohbattery_info.cpp b/frameworks/capi/battery_info/ohbattery_info.cpp index cd9999a6e6adfa5d23781c320613c86f274f9e74..a426b492a6d05f48a88736dfe21a7ec6a003471f 100644 --- a/frameworks/capi/battery_info/ohbattery_info.cpp +++ b/frameworks/capi/battery_info/ohbattery_info.cpp @@ -21,14 +21,14 @@ using namespace OHOS::PowerMgr; -int32_t OH_BatteryInfo_GetCapacity() +int32_t OH_BatteryInfo_GetCapacity(void) { BatterySrvClient& batterySrvClient = BatterySrvClient::GetInstance(); int32_t ret = batterySrvClient.GetCapacity(); return ret; } -BatteryInfo_BatteryPluggedType OH_BatteryInfo_GetPluggedType() +BatteryInfo_BatteryPluggedType OH_BatteryInfo_GetPluggedType(void) { BatterySrvClient& batterySrvClient = BatterySrvClient::GetInstance(); uint32_t result = static_cast(batterySrvClient.GetPluggedType()); diff --git a/interfaces/kits/c/ohbattery_info.h b/interfaces/kits/c/ohbattery_info.h index b0ff79992764cc754926d3957ba361ee599b539d..5288b8745396af6ba49ba6637b31f9a752f84880 100644 --- a/interfaces/kits/c/ohbattery_info.h +++ b/interfaces/kits/c/ohbattery_info.h @@ -103,7 +103,7 @@ typedef enum { * @syscap SystemCapability.PowerManager.BatteryManager.Core * @since 13 */ -int32_t OH_BatteryInfo_GetCapacity(); +int32_t OH_BatteryInfo_GetCapacity(void); /** * @brief This API returns the current plugged type. @@ -116,7 +116,7 @@ int32_t OH_BatteryInfo_GetCapacity(); * @syscap SystemCapability.PowerManager.BatteryManager.Core * @since 13 */ -BatteryInfo_BatteryPluggedType OH_BatteryInfo_GetPluggedType(); +BatteryInfo_BatteryPluggedType OH_BatteryInfo_GetPluggedType(void); #ifdef __cplusplus } #endif /* __cplusplus */