HomeFreeBSD

Fix the following -Wcast-qual warnings in usr.sbin/sa/db.c:

Description

Fix the following -Wcast-qual warnings in usr.sbin/sa/db.c:

usr.sbin/sa/db.c:82:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual]

key.data = (void*)&VERSION_KEY;
                  ^

usr.sbin/sa/db.c:178:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual]

key.data = (void*)&VERSION_KEY;
                  ^

Replace the VERSION_KEY define with a writable char array, so no const
qualifier needs to be dropped anymore.

Submitted by: rdivacky

Details

Provenance
dimAuthored on Jan 28 2015, 10:22 PM
Parents
rG9304cfd07cfd: Fix multiple instances of the following clang 3.6.0 warning in ppp:
Branches
Unknown
Tags
Unknown

Event Timeline