I am trying to get rid of violation of rule 15.5 from my code.
Sample code:
#define RETURN_VAL(num) {return (2 * num);} 
static int32_t
func(int32_t n1, int32_t n2, int32_t n3)
{  
    if (n1 == 1) {                
        RETURN_VAL(1);
    }
    if (n2 == 2) {
        RETURN_VAL(2);                  
    }
    if (n3 == 3) {
        RETURN_VAL(3);             
    }
    return 0;
}
Since the MACRO(having return value) is using in multiple places, result in violation of Rule 15.5.
Is there anyway to fix this keeping as MACRO itself.