Fix error from syntax checking
This fixes the confict of decalaration and definition between class
and struct. It also fixes the virtual function overloading.
BUG=chromium:218316
TEST=USE="chrome_internal" CFLAGS="-clang -print-cmdline"
CXXFLAGS="-clang -print-cmdline" emerge-x86-alex
gobi-cromo-plugin
passes.
Change-Id: I5109af3aff4052477b2e255b45ab06537e306527
Reviewed-on: https://gerrit.chromium.org/gerrit/47482
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
diff --git a/gobi_modem.cc b/gobi_modem.cc
index cf26b5f..7c87bfc 100644
--- a/gobi_modem.cc
+++ b/gobi_modem.cc
@@ -237,7 +237,8 @@
// operation waits for the PowerCallback, or because we cannot respond
// immmediately (because a long-running connect is already in
// progress)
-struct PendingEnable {
+class PendingEnable {
+ public:
PendingEnable(bool enable) : enable_(enable) {}
DBus::Tag tag_;
// NB: contrary to our style guide, this throws an exception that
diff --git a/gobi_modem.h b/gobi_modem.h
index bc2bd38..42c9721 100644
--- a/gobi_modem.h
+++ b/gobi_modem.h
@@ -89,7 +89,7 @@
class InjectedFaults;
class GobiModemHelper;
-struct PendingEnable;
+class PendingEnable;
class ScopedGSource {
public:
diff --git a/gobi_modem_factory.h b/gobi_modem_factory.h
index 4c37d77..7f389aa 100644
--- a/gobi_modem_factory.h
+++ b/gobi_modem_factory.h
@@ -8,7 +8,7 @@
namespace DBus {
class Connection;
-class Path;
+struct Path;
}
namespace gobi {
struct DeviceElement;
diff --git a/gobi_sdk_wrapper.h b/gobi_sdk_wrapper.h
index 82b5205..055a810 100644
--- a/gobi_sdk_wrapper.h
+++ b/gobi_sdk_wrapper.h
@@ -1028,7 +1028,8 @@
protected:
- struct CallWrapper {
+ class CallWrapper {
+ public:
CallWrapper(Sdk *sdk, const char *name);
ULONG CheckReturn(ULONG rc);
~CallWrapper();
diff --git a/mock_gobi_sdk_wrapper.h b/mock_gobi_sdk_wrapper.h
index 5bc54d3..c734867 100644
--- a/mock_gobi_sdk_wrapper.h
+++ b/mock_gobi_sdk_wrapper.h
@@ -142,10 +142,10 @@
virtual ULONG StartDataSession(
ULONG * pTechnology,
- CHAR * pAPNName,
+ const CHAR * pAPNName,
ULONG * pAuthentication,
- CHAR * pUsername,
- CHAR * pPassword,
+ const CHAR * pUsername,
+ const CHAR * pPassword,
ULONG * pSessionId,
ULONG * pFailureReason) {
if (strict_) {
@@ -372,7 +372,9 @@
BYTE * pRadioIfaces,
ULONG * pRoaming,
WORD * pMCC,
- WORD * pMNC) {
+ WORD * pMNC,
+ BYTE nameSize,
+ CHAR * pName) {
if (strict_) {
ADD_FAILURE() << kBadCall << __PRETTY_FUNCTION__;
}