Mark mclock parameter of update_media_clock as const #5

Merged
merged 1 commit into from May 17, 2012

Conversation

Projects
None yet
2 participants
Member

rlsosborne commented May 17, 2012

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.

@rlsosborne rlsosborne Mark mclock parameter of update_media_clock as const.
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.
d047b80

@ajwlucas ajwlucas pushed a commit that referenced this pull request May 17, 2012

Andy Lucas Merge pull request #5 from rlsosborne/master
Mark mclock parameter of update_media_clock as const
2df83bd

@ajwlucas ajwlucas merged commit 2df83bd into xcore:master May 17, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment