1

I am using cocos2d-x library and trying to call couple of functions from it. The code compiles without any error while the code analyzer keeps complaining about "Invalid Arguments" in two functions:

static inline ccColor3B ccc3(const GLubyte r, const GLubyte g, const GLubyte b);
static CCTintTo* create(float duration, GLubyte red, GLubyte green, GLubyte blue);

All other calls work perfectly. The common thing between these two that is not available in the other functions is the usage of GLubyte. GLubyte is defined as follows:

typedef unsigned char GLubyte;

I don't believe that the problem lies in the way I call the methods, but here is a snippet about the related parts:

#include "cocos2d.h"
USING_NS_CC;
...
ccColor3B color=ccc3(250,200,100);

It looks like that the problem is caused by CODAN. So my question is: What should I change/add in my code in order to satisfy the analyzer and remove all these errors? I would prefer not disabling it, so any manual solution would suffice.

Sami
  • 1,369
  • 14
  • 35

0 Answers0