将int变量转为(void*)时出现错误 error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

这是由于int类型为32位,指针为long long 64位

解决方法:(void*)(intptr_t)

Warning: cast to/from pointer from/to integer of different size的更多相关文章

  1. warning: assignment from incompatible pointer type [enabled by default]

    kernel 编译产生这个警告的原因是 不兼容指针类型的赋值 这个原因很有可能是因为返回值和正在接受这个指针类型名不相同. // vim arch/arm/mach-omap2/usb-host.c ...

  2. Keil软件常见的警告和错误含义。——Arvin

    1. warning:  #767-D: conversion from pointer to smaller integer 解释:将指针转换为较小的整数 影响:可能造成的影响:容易引起数据截断,造 ...

  3. Keil常见错误汇总及处理方式

    1. warning: #767-D: conversion from pointer to smaller integer 解释:将指针转换为较小的整数 影响:可能造成的影响:容易引起数据截断,造成 ...

  4. (C/C++学习笔记) 十二. 指针

    十二. 指针 ● 基本概念 位系统下为4字节(8位十六进制数),在64位系统下为8字节(16位十六进制数) 进制表示的, 内存地址不占用内存空间 指针本身是一种数据类型, 它可以指向int, char ...

  5. Pointer arithmetic for void pointer in C

    http://stackoverflow.com/questions/3523145/pointer-arithmetic-for-void-pointer-in-c When a pointer t ...

  6. 16种C语言编译警告(Warning)类型的解决方法

    当编译程序发现程序中某个地方有疑问,可能有问题时就会给出一个警告信息.警告信息可能意味着程序中隐含的大错误,也可能确实没有问题.对于警告的正确处理方式应该是:尽可能地消除之.对于编译程序给出的每个警告 ...

  7. C语言 消灭编译警告(Warning)

    如何看待编译警告 当编译程序发现程序中某个地方有疑问,可能有问题时就会给出一个警告信息.警告信息可能意味着程序中隐含的大错误,也可能确实没有问题.对于警告的正确处理方式应该是:尽可能地消除之.对于编译 ...

  8. C#/.NET Little Wonders: Use Cast() and OfType() to Change Sequence Type(zz)

    Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, ...

  9. Python integer objects implementation

    http://www.laurentluce.com/posts/python-integer-objects-implementation/ Python integer objects imple ...

随机推荐

  1. java基础总结--equals与==

    equals 与 == 先上一段经典代码 public static void main(String[] args) { // TODO Auto-generated method stub int ...

  2. bzoj 2002 LinkCutTree

    我的第一道LCT题(居然1A,O(∩_∩)O哈哈~) 题目:http://www.lydsy.com/JudgeOnline/problem.php?id=2002 大概题意: 给一颗有根树,维护每个 ...

  3. JavaScript学习笔记 isPrototypeOf和hasOwnProperty使用区别

    1.isPrototypeOf isPrototypeOf是用来判断指定对象object1是否存在于另一个对象object2的原型链中,是则返回true,否则返回false. 格式如下: object ...

  4. wampserver -- 解决Exception Exception in module wampmanager.exe at 000F15A0

    Learn from: http://hi.baidu.com/spt_form/item/4b4533476c3b92a6de2a9f78 系统:windows2003 32bit wampserv ...

  5. Google Code Jam Africa 2010 Qualification Round Problem A. Store Credit

    Google Code Jam Qualification Round Africa 2010 Problem A. Store Credit https://code.google.com/code ...

  6. jpush-react-native 推送功能(Android 篇)

    github原地址 极光推送官方支持的 React Native 插件 安装 npm install jpush-react-native --savenpm install jcore-react- ...

  7. 使用Win2D在UWP程序中2D绘图(一)

    在新的Windows UWP程序中,引入了一个新的API库: Win2D.它是一个d2d的封装,可以直接使用C#来快速实现高效2D绘图了.这个API虽然在Win8.1时代就开始着手开发了,但最近才完善 ...

  8. Gulp插件使用技巧

    目录: 插件的安装卸载 插件使用的基本流程 拆分任务 监听 默认任务 一.插件的安装卸载 安装: npm install gulp-less --save-dev 卸载 npm uninstall g ...

  9. Android开发project师,前行路上的14项技能

    导读: 你是否曾渴望回到宋朝? 或者什么朝,反正就是男耕女织的古代. 哦,那时的首都在汴梁(开封),房价想必没有如今这么高,工作?无非就是给你把锄头,去,种地去.夕阳西下了,麦子垛后,你和翠姑搂抱在一 ...

  10. 9.线程通信wait、notify

    线程之间通信 1.线程是操作系统的独立的个体,但这些个体如果不经过特殊处理就不能成为一个整体. 2.使用wait.notify,方法实现线程通信(2个方法都是需要object方法) 3.wait(释放 ...