xcore / sw_avb

AVB Software stack
http://github.xcore.com/sw_avb
Other
116 stars 54 forks source link

Mark mclock parameter of update_media_clock as const #5

Closed rlsosborne closed 12 years ago

rlsosborne commented 12 years ago

media_clock_server.c contains the following call:

media_clocks[i].wordLength = update_media_clock(ptp_svr, i, media_clocks[i], clk_time, CLOCK_RECOVERY_PERIOD);

Previously media_clocks would conservatively be consider as written by the RHS since it is passed by non const reference. It is also written on the LHS of the assignment. This is invalid according to the XC spec. The 11.11.0 tools don't spot this but future versions will.