warning: missing sentinel in function call
来源:互联网 发布:知乎回答问题怎么赚钱 编辑:程序博客网 时间:2024/06/05 00:22
http://blog.csdn.net/freedom2028/article/details/7009694
在写一个练习时候出现的.觉得奇怪,因为翻译说缺少哨兵??什么意思呢...
=====================================
/*
//练习如下,创建一个进程
*/
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
printf("Running ps with execlp\n");
execlp("ps", "ps", "-ax", 0); /*<----错误出现所在行,更改方法.把0 改成 (char *)0 即可*/
printf("Done.\n");
exit(0);
}
================================
pexec.c: 在函数‘main’中:
pexec.c:8: 警告: 函数调用中缺少哨兵
-----------------------------------------------------------
显然中文是不能搞清楚的.
切换到英文看看:输入export LANG=POSIX
然后再次看看
---------------------
pexec.c: In function 'main':
pexec.c:8: warning: missing sentinel in function call
---------------------------------------
百度到CU发现有人提出一样的问题:
结论是:
占用内存的时候 内存区域两端值不确定 所以会提示 需要两边哨兵 站岗. 说白了就是初始化!
=====================================
/*
//练习如下,创建一个进程
*/
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
printf("Running ps with execlp\n");
execlp("ps", "ps", "-ax", 0); /*<----错误出现所在行,更改方法.把0 改成 (char *)0 即可*/
printf("Done.\n");
exit(0);
}
================================
pexec.c: 在函数‘main’中:
pexec.c:8: 警告: 函数调用中缺少哨兵
-----------------------------------------------------------
显然中文是不能搞清楚的.
切换到英文看看:输入export LANG=POSIX
然后再次看看
---------------------
pexec.c: In function 'main':
pexec.c:8: warning: missing sentinel in function call
---------------------------------------
百度到CU发现有人提出一样的问题:
结论是:
占用内存的时候 内存区域两端值不确定 所以会提示 需要两边哨兵 站岗. 说白了就是初始化!
http://bbs.chinaunix.net/thread-1335982-1-1.html
转自:http://hi.baidu.com/esta_pessoa/blog/item/0d274c09eed076a32fddd4d8.html
0 0
- warning: missing sentinel in function call
- warning: missing sentinel in function call
- warning: missing sentinel in function call
- 编译错误----warning: missing sentinel in function call [-Wformat]
- 记一个程序编译错误: warning: missing sentinel in function call [-Wformat]
- 执行 execl时发生warning: missing sentinel in function call [-Wformat]警告
- xcode编译警告:Missing sentinel in function call
- warning C4551: function call missing argument list 问题
- missing sentinel in method dispatch
- Call JS function in Silverlight4
- 【Python】 Missing parentheses in call to 'print'
- 【Python】 Missing parentheses in call to 'print'
- 【Python】 Missing parentheses in call to 'print'
- Missing parentheses in call to 'print'
- 【PYTHON】 Missing parentheses in call to 'print'
- 【Python】 Missing parentheses in call to 'print'
- SyntaxError: Missing parentheses in call to 'print'
- SyntaxError:Missing parentheses in call to 'print'
- Replay Gain 回放增益
- disable QComboBox中的item及修改其颜色
- fms 项目目录映射到网络磁盘(Mapping directories to network drives)
- HashMap源码阅读
- 目标检测的图像特征提取之(一)HOG特征
- warning: missing sentinel in function call
- 广州白云区仓库出租/白云区物流仓库出租/仓储管理-龙森物流
- 位运算符和static
- Android 自定义ListView Item侧滑删除
- AutoLayout(自动布局)入门
- 优先队列容器-priority_queue
- 广州仓储公司 提供广州仓储配送服务,龙森广州仓储公司
- HTML5在移动应用开发中的使用
- 解决Spring MVC @ResponseBody返回中文字符串乱码问题