Constify a struct savexmm pointer in pt_ucontext_to_fpreg(), to silence

a -Wcast-qual warning from clang 3.6.0.
This commit is contained in:
dim 2015-01-27 18:56:46 +00:00
parent 0f98db1b3f
commit 6f1ff22dae

View File

@ -72,7 +72,7 @@ pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r)
memcpy(r, &uc->uc_mcontext.mc_fpstate, sizeof(struct save87));
else {
int i;
struct savexmm *sx = (struct savexmm *)&uc->uc_mcontext.mc_fpstate;
const struct savexmm *sx = (const struct savexmm *)&uc->uc_mcontext.mc_fpstate;
memcpy(&r->fpr_env, &sx->sv_env, sizeof(r->fpr_env));
for (i = 0; i < 8; ++i)
memcpy(&r->fpr_acc[i], &sx->sv_fp[i].fp_acc, 10);