Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/packchk/include/PackChk.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PackChk {
PackChk();
~PackChk();

int Check(int argc, const char* argv[], const char* envp[]);
int Check(int argc, const char** argv, const char** envp);

const RteGlobalModel& GetModel() { return m_rteModel; }

Expand Down
2 changes: 1 addition & 1 deletion tools/packchk/include/ParseOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ParseOptions {
Error,
};

Result Parse(int argc, const char* argv[]);
Result Parse(int argc, const char** argv);

protected:
bool SetWarnLevel(const std::string& warnLevel);
Expand Down
2 changes: 1 addition & 1 deletion tools/packchk/src/PackChk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ bool PackChk::CheckPackage()
* @param envp command line argument (not used)
* @return passed / failed
*/
int PackChk::Check(int argc, const char* argv[], const char* envp[])
int PackChk::Check(int argc, const char** argv, const char** envp)
{
const string header = m_packOptions.GetHeader();
cout << header << endl;
Expand Down
2 changes: 1 addition & 1 deletion tools/packchk/src/PackChkMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @param envp command line argument (not used)
* @return 0: ok, 1: error
*/
int main(int argc, const char* argv [], const char* envp [])
int main(int argc, const char** argv, const char** envp)
{
PackChk packChk;

Expand Down
2 changes: 1 addition & 1 deletion tools/packchk/src/ParseOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ bool ParseOptions::SetDisableValidation(bool bDisable)
* @param argv command line
* @return passed / failed
*/
ParseOptions::Result ParseOptions::Parse(int argc, const char* argv[])
ParseOptions::Result ParseOptions::Parse(int argc, const char** argv)
{
const string fileName = m_packOptions.GetProgramName();
bool bOk = true;
Expand Down
6 changes: 5 additions & 1 deletion tools/packchk/src/ValidateSyntax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,7 @@ bool ValidateSyntax::CheckBoards(RtePackage* pKg)
LogMsg("M375", VAL("BOARD", boardName));
}

// deviceIndex must be unique among mounted devices on this board.
map<string, RteItem*> mountedDeviceIndex;
for(auto mountedDevice : mountedDevices) {
lineNo = mountedDevice->GetLineNumber();
Expand Down Expand Up @@ -1726,11 +1727,13 @@ bool ValidateSyntax::CheckBoards(RtePackage* pKg)
continue;
}

// Mounted devices require a concrete Dname; wildcard patterns are not allowed.
if(dname.find_first_of("*?[]") != string::npos) {
LogMsg("M607", TAG("Dname"), NAME(dname), lineNo);
continue;
}

// Resolve the reference against the loaded device model, including reference packs.
list<RteDevice*> devices;
GetModel().GetDevices(devices, dname, dvendor);
if(devices.empty()) {
Expand All @@ -1742,6 +1745,7 @@ bool ValidateSyntax::CheckBoards(RtePackage* pKg)
LogMsg("M100", lineNo);
}

// Warn when a mounted device name still denotes a device with variants.
for(const auto device : devices) {
if(device->GetDeviceItemCount() > 0) {
LogMsg("M611", VENDOR(dvendor), MCU(dname), lineNo);
Expand All @@ -1761,7 +1765,7 @@ bool ValidateSyntax::CheckBoards(RtePackage* pKg)
LogMsg("M010");
}

// ------------ compatible devices ------------------
// Compatible devices describe alternatives and may use Dname wildcard patterns.
Collection<RteItem*> compatibleDevices;
board->GetCompatibleDevices(compatibleDevices);

Expand Down
Loading