); \r
declaList.add(decl);\r
\r
- cInstCode = tab + " { 0 } " + String.format("/* %s */", stringTable) + commaNewLine;\r
+ cInstCode = " { 0 } " + String.format("/* %s */", stringTable);\r
instTable.put(stringTable, cInstCode);\r
} else {\r
\r
//\r
// Generate code for every alignment size\r
//\r
+ boolean uinitDatabaseEmpty = true;\r
for (int align = 8; align > 0; align >>= 1) {\r
ArrayList<String> declaListBasedOnAlignment = alignmentInitDecl.get(new Integer(align));\r
ArrayList<String> instListBasedOnAlignment = alignmentInitInst.get(new Integer(align));\r
}\r
\r
declaListBasedOnAlignment = alignmentUninitDecl.get(new Integer(align));\r
+ \r
+ if (declaListBasedOnAlignment.size() != 0) {\r
+ uinitDatabaseEmpty = false;\r
+ }\r
+ \r
for (Object d : declaListBasedOnAlignment) {\r
String s = (String)d;\r
uninitDeclStr += tab + s;\r
}\r
}\r
\r
+ if (uinitDatabaseEmpty) {\r
+ uninitDeclStr += tab + " UINT8 dummy; /* PCD_DATABASE_UNINIT is emptry */\r\n";\r
+ }\r
+ \r
initDeclStr += String.format("} %s_PCD_DATABASE_INIT;", phase) + newLine + newLine;\r
- initInstStr += "};";\r
+ initInstStr += "};" + newLine;\r
uninitDeclStr += String.format("} %s_PCD_DATABASE_UNINIT;", phase) + newLine + newLine;\r
\r
result.put("initDeclStr", initDeclStr);\r