This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MISRA warning (MISRA-C:2004 17.6/R) Misreported

Hi Folks, 

MISRA warning (MISRA-C:2004 17.6/R) The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist

I note from past posts that there seems to be long running issues with this MISRA warning so I would like to add my test case:

typedef struct {
    uint16_t foo;
    uint16_t bar;
} myStruct_t;

typedef mystruct_t * myHandle_t;

myStruct_t fbs = {0U};
myHandle_t fbh = &fbs;

void myStructUpdater (myHandle_t h) {
    h->foo = h->bar; /* MISRA 17.6/R warning here. */
}

I think maybe this warning should not be here as an address is not being assigned and the assigned object has the same storage class as the object to which it is being assigned.

Thanks