我尝试用 gcc 5.2 编译一个 android 内核并修复了所有错误,除了这个:
crypto/testmgr.c:1112:36: warning: passing argument 2 of 'crypto_compress_setup' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
error, forbidden warning: testmgr.c:1112
这是代码:
static int test_pcomp(struct crypto_pcomp *tfm,
struct pcomp_testvec *ctemplate,
struct pcomp_testvec *dtemplate, int ctcount,
int dtcount)
{
const char *algo = crypto_tfm_alg_driver_name(crypto_pcomp_tfm(tfm));
unsigned int i;
char result[COMP_BUF_SIZE];
int res;
for (i = 0; i < ctcount; i++) {
struct comp_request req;
unsigned int produced = 0;
res = crypto_compress_setup(tfm, ctemplate[i].params,
ctemplate[i].paramsize);
if (res) {
pr_err("alg: pcomp: compression setup failed on test "
"%d for %s: error=%d\n", i + 1, algo, res);
return res;