File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,7 +74,11 @@ void Check64BitPortability::pointerassignment()
7474 type = INT;
7575 else if (type == PTR && Token::Match (tok2, " - %var%" ) && isaddr (tok2->next ()->variable ()))
7676 type = PTRDIFF;
77- else if (Token::Match (tok2, " %type% (" )) {
77+ else if (Token::Match (tok2, " (" )) {
78+ type = NO;
79+ break ;
80+ } else if (tok2->str () == " (" ) {
81+ // TODO: handle parentheses
7882 type = NO;
7983 break ;
8084 } else if (type == PTR && Token::simpleMatch (tok2, " ." ))
Original file line number Diff line number Diff line change @@ -193,6 +193,12 @@ class Test64BitPortability : public TestFixture {
193193 " return 1 + p->i;\n "
194194 " }" );
195195 ASSERT_EQUALS (" " , errout.str ());
196+
197+ check (" static void __iomem *f(unsigned int port_no) {\n "
198+ " void __iomem *mmio = hpriv->mmio;\n "
199+ " return mmio + (port_no * 0x80);\n "
200+ " }" );
201+ ASSERT_EQUALS (" " , errout.str ());
196202 }
197203};
198204
You can’t perform that action at this time.
0 commit comments