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; --------------------------------- ...
随机推荐
- UiAutomator环境搭建及详细操作
一.环境搭建 1.1 必备条件 JDK SDK(API高于15) Eclipse(安装ADT插件) ANT(用于编译生成的jar) 安装JDK并添加环境变量 1.2 详细步骤 1.安装JDK并添加环境 ...
- python 高级特性
from http://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000 set set和dict ...
- 与Status Bar和Navigation Bar相关的一些东西
Android Navigation Bar Status Bar 与StatusBar和NavigationBar相关的东西有两种,一是控制它们的显示与隐藏,二是控制它们的透明与否及背景. 在2 ...
- js根据当前时间获取当前季度,月份,和第几周
function jidu() { var getMonthWeek = function (a, b, c) { var date = new Date(a, parseInt(b) - ...
- 在centos6.5中安装zookeeper集群
简介 ZooKeeper服务器是用Java编写创建,它运行在JVM.所以需要使用JDK 6或更高版本,在这里就不说在centos安装jdk环境了,直接进入正题,我搭建的是 192.168.0.2, 1 ...
- sphinx 源码阅读之分词,压缩索引,倒排——单词对应的文档ID列表本质和lucene无异 也是外部排序再压缩 解压的时候需要全部扫描doc_ids列表偏移量相加获得最终的文档ID
转自:http://github.tiankonguse.com/blog/2014/12/03/sphinx-token-inverted-sort.html 外部排序 现在我们的背景是有16个已经 ...
- to my friends-Don't give up so fast
早上听到大学挺要好的朋友突然说要换行,心情就一股莫名的哀伤,因为当初是三个人一起约定好的,要朝着我们共同的目标而努力奋斗的,这股热情怎能这么轻易地被现实的冷水浇灭.没错,我们是刚出社会的毛头小子,我们 ...
- 移动端rem处理字体的js代码
(function (doc, win) { var docEl = doc.documentElement, resizeEvt = 'orientationchange' in window ? ...
- Topcoder SRM584 DIV 2 500
#include <set> #include <iostream> #include <string> #include <vector> using ...
- LINQ 嵌套查询
直接代码: //获取教材下的章跟篇 IList<Chapter> chapters = EntAppFrameWorkContext.DomainModelService.ExtenedS ...