Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Does constness count as a type difference in rule 11.2?
#2
fpeelo Wrote:typedef struct s_EthBuf *TEthBuf;
typedef struct s_EthBuf const *CTEthBuf;

Sorry, that latter type should have been

typedef const struct s_EthBuf *CTEthBuf;

It's for rule 8.13

But whichever way around it's put, PC-Lint still recognises TEthBuf and CTEthBuf as distinct types, so a function with a parameter TEthBuf cannot pass it to a function which takes CTEthBuf, or const struct s_EthBuf *
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)