Skip to content
Snippets Groups Projects
Commit cc242cb1 authored by Axel Naumann's avatar Axel Naumann
Browse files

Fix includes (printf etc).

Remove compiler warnings for wrong format specifier where we don't explicitly test it.


git-svn-id: http://root.cern.ch/svn/root/trunk@31785 27541ba8-7e3a-0410-8455-c3a389f83636
parent 0908047a
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
* For the licensing terms see the file COPYING
*
************************************************************************/
#include <stdio.h>
#include <iostream>
typedef long long Long64_t;
int main()
......@@ -18,6 +19,7 @@ int main()
printf("printf ll: %lld\n", w[0]);
printf("one less ll: %lld\n", 2146929056215846578LL);
printf("again ll: %lld\n", w[0]);
// warnings are intentional
printf("printf l: %ld\n", w[0]);
printf("one less l: %ld\n", 2146929056215846578LL);
printf("again l: %ld\n", w[0]);
......
......@@ -17,8 +17,8 @@ int main() {
aaa a;
aaa1 *a1 = (aaa1*)&a;
aaa2 *a2 = (aaa2*)&a;
printf("aaa1 offset = %d\n",(char*)a1 - (char*)&a);
printf("aaa2 offset = %d\n",(char*)a2 - (char*)&a);
printf("aaa1 offset = %ld\n",(char*)a1 - (char*)&a);
printf("aaa2 offset = %ld\n",(char*)a2 - (char*)&a);
a.fun();
a1->fun1();
a2->fun2();
......
......@@ -16,8 +16,8 @@ typedef unsigned long long ULong64_t;
int main() {
printf("%d\n",sizeof(Long64_t));
printf("%d\n",sizeof(ULong64_t));
printf("%d\n",(int)sizeof(Long64_t));
printf("%d\n",(int)sizeof(ULong64_t));
return 0;
}
......@@ -6,6 +6,7 @@
*
************************************************************************/
#include <stdio.h>
#include <string>
namespace crap {
......
......@@ -18,7 +18,7 @@ int main() {
for(int i=0;i<3;i++) {
c = a*b*i;
printf("%d %d %d\n",sizeof(long double),sizeof(a),sizeof(double));
printf("%d %d %d\n",(int)sizeof(long double),(int)sizeof(a),(int)sizeof(double));
cout << a << " " << b << " " << c << endl;
}
return 0;
......
......@@ -131,7 +131,7 @@ const size_t sz=5;
void test5()
{
ary<sz,B<int> > a;
printf("a.size=%d\n",a.size);
printf("a.size=%d\n",(int)a.size);
}
///////////////////////////////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment