passing argument 3 of ‘wtk_hlv_rec_init’ discards ‘const’ qualifier from pointer target type
-Werror,编译出现如下错误:
src/wtk/exam/wtk_ndx.c:154:6: error: passing argument 3 of ‘wtk_hlv_rec_init’ discards ‘const’ qualifier from pointer target type [-Werror]
ret = wtk_hlv_rec_init(&(nd->rec_hd), &(cfg->rec_hd), nd->hmmset, 0.02f);
^
In file included from src/wtk/exam/wtk_ndx.h:13:0,
from src/wtk/exam/wtk_ndx.c:13:
函数申明: int wtk_hlv_rec_init(wtk_hlv_rec_t* r, const wtk_hlv_rec_cfg_t* cfg, wtk_hmmset_t *hs, double frame_dur);
nd->hmmset为常量
解决办法:1)修改函数申明 int wtk_hlv_rec_init(wtk_hlv_rec_t* r, const wtk_hlv_rec_cfg_t* cfg, const wtk_hmmset_t *hs, double frame_dur);
2)使用时强制转换 wtk_hlv_rec_init(&(nd->rec_hd), &(cfg->rec_hd), (wtk_hmm_t *)nd->hmmset, 0.02f);
passing argument 3 of ‘wtk_hlv_rec_init’ discards ‘const’ qualifier from pointer target type的更多相关文章
- puts函数出现warning: passing argument 1 of ‘puts’ from incompatible pointer type(警告:从不兼容的指针类型传递“puts”的参数1)
代码: /************************************************************************* > File Name: ptr_v ...
- A const field of a reference type other than string can only be initialized with null Error [duplicate]
I'm trying to create a 2D array to store some values that don't change like this. const int[,] hiveI ...
- 力扣 报错 runtime error: load of null pointer of type 'const int'
runtime error: load of null pointer of type 'const int' 要求返回的是int* 解决方案 1.指针使用malloc分配空间 用 int * p = ...
- mybatis No enum const class org.apache.ibatis.type.JdbcType.Date 坑爹的配置
转自:https://lihaiming.iteye.com/blog/2248059 在ibatis中不需要关注这些参数 而转到mybatis后 如果字段值为空 必须设置jdbcType如inser ...
- CTC安装及其错误解决办法:binding.cpp:92:49: error: cannot convert ‘THCudaTensor*’ to ‘const THFloatTensor*’ for argument ‘1’ to ‘int64_t THFloatTensor_size(const THFloatTensor*, int)’
CTC安装: 1. 在终端执行命令:git clone https://github.com/SeanNaren/warp-c) (效果如下图,大家不用管我前面括号的内容,那是我打开的虚拟环境) 2. ...
- Mybatis异常--java.lang.IllegalArgumentException: NO ENUM const class org.apache.ibatis.type.JdbcType.int
今天下午写代码时发现一直报错,找了半天都没找到错误原因. 最后才发现原来是XML配置错误,某条属性的JdbcType我按照以前ibatis的习惯写的int,但是Mybatis不识别的. 上Mybati ...
- mybatis No enum const class org.apache.ibatis.type.JdbcType.Integer
mybatis报错:没有Integer这个类型的jdbcType值 原因:mybatis配置重的jdbaType类型要是大写的 如图所示:
- [踩坑记录] runtime error: load of null pointer of type 'const int' (leetcode)
leetcode上面做题遇到的错误 原因: 在调用函数时,如果返回值如果是一个常量则没问题.如果返回值若为指针则可能会出现该错误,假如返回的指针地址指向函数内的局部变量,在函数退出时,该变量的存储空间 ...
- const类型变量的详细解读
const类型变量--------------------------------------int i;const int *p; --------------------------------- ...
随机推荐
- TCP/IP协议学习(三) STM32中ETH驱动配置注意事项
1.MII/RMII/SMI接口连接和配置 SMI又称站点管理接口,用于cpu与外置PHY芯片通讯,配置相关参数,包含MDC和MDIO两个管脚(CPU上有对应引脚,当然用普通GPIO口模拟SMI管理也 ...
- 转json using指令
using Newtonsoft.Json;using Newtonsoft.Json.Converters; string result = JsonConvert.SerializeObject( ...
- CentOS PPTP配置FreeRADIUS+DaloRADIUS实现高级用户控制+流量控制
前提条件 阅读本文前,您需要搭建好PPTP,如果仍未搭建,可以参考:http://www.xj123.info/2301.html 如果您需要配置DaloRADIUS,那么您还需要安装LAMP,可以参 ...
- springmvc__SimpleUrlHandlerMapping(对访问地址进行加工,以键值对的形式)
1.配置web.xml(这里配置url-pattern为/) <!-- 编码过滤器 --> <filter> <filter-name>characterEncod ...
- chrome浏览器遇到的异常
昨天写了一个二进制输出图片的方法,发现在chrome浏览器里面出了异常: (failed) net::ERR_INCOMPLETE_CHUNKED_ENCODING 代码是这样写的: //直接输出 ...
- gz
不准备的话,是真的会滚粗的. leetcode 还是重新做起来叭. 那么就开始咯 8.22 leetcode 144 Binary Tree Preorder Traversal 二叉树的前序遍历 ...
- mac xcworkspace xcodebuild
xcodebuild 在介绍xcodebuild之前,需要先弄清楚一些在XCode环境下的一些概念[4]: Workspace:简单来说,Workspace就是一个容器,在该容器中可以存放多个你创建的 ...
- Linux 安装图形界面及远程连接
#可查询哪些组件是否已经安装(可用来对照组件名称) yum grouplist yum groupinstall 'X Window System' -y #安装GNOME桌面环境 yum group ...
- Swift 01.String
1.字符串拼接 var num1 = "hello,world" var name = "xiaoming" var age = let student = n ...
- input框限制只能输入正整数,逻辑与和或运算
推荐下自己刚写的项目,请大家指正:童话之翼 有时需要限制文本框输入内容的类型,本节分享下正则表达式限制文本框只能输入数字.小数点.英文字母.汉字等代码. 例如,输入大于0的正整数 代码如下: < ...