warning: missing sentinel in function call
来源:互联网 发布:mac百度网盘上传速度慢 编辑:程序博客网 时间:2024/05/22 06:17
在写一个练习时候出现的.觉得奇怪,因为翻译说缺少哨兵??什么意思呢...
=====================================
/*
//练习如下,创建一个进程
*/
#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 即可 , 或者0改成NULL就不会有警告了,*/
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 即可 , 或者0改成NULL就不会有警告了,*/
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发现有人提出一样的问题:
结论是:
占用内存的时候 内存区域两端值不确定 所以会提示 需要两边哨兵 站岗. 说白了就是初始化!
- 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'
- fzu 2105 Digits Count
- Appler即时通讯
- 一个用摄像头获取条形码并显示类型及解码的实例及每个步骤注解
- github_异常_特殊文件提交失败(Fail to commit)
- 一段可视化的条码扫描线的实例和注解
- warning: missing sentinel in function call
- 一个摄像头解码二维码的实例及分步骤注解
- Blob分析的例子,抽取Blobs
- jar包中的 manifest详解
- FillChar
- linux中全局热键设置工具xbindkeys
- 验证 Ubuntu11.10 安装telnet ssh ftp 软件
- Visual Studio 10.0设置引用HalconDotNet.dll
- oracle 追踪一个SQL会话