Skip to content

Commit

Permalink
fixing several warnings
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.pointclouds.org/pcl/trunk@5005 a9d63959-f2ad-4865-b262-bf0e56cfafb6
  • Loading branch information
gedikli committed Mar 10, 2012
1 parent 96414f0 commit ff10a21
Show file tree
Hide file tree
Showing 8 changed files with 4,162 additions and 2,132 deletions.
8 changes: 4 additions & 4 deletions io/src/openni_camera/openni_image_bayer_grbg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
#include <sstream>
#include <iostream>

#define AVG(a,b) (((int)(a) + (int)(b)) >> 1)
#define AVG3(a,b,c) (((int)(a) + (int)(b) + (int)(c)) / 3)
#define AVG4(a,b,c,d) (((int)(a) + (int)(b) + (int)(c) + (int)(d)) >> 2)
#define WAVG4(a,b,c,d,x,y) ( ( ((int)(a) + (int)(b)) * (int)(x) + ((int)(c) + (int)(d)) * (int)(y) ) / ( ((int)(x) + (int(y))) << 1 ) )
#define AVG(a,b) static_cast<unsigned char>((int(a) + int(b)) >> 1)
#define AVG3(a,b,c) static_cast<unsigned char>((int(a) + int(b) + (int)(c)) / 3)
#define AVG4(a,b,c,d) static_cast<unsigned char>((int(a) + int(b) + int(c) + int(d)) >> 2)
#define WAVG4(a,b,c,d,x,y) static_cast<unsigned char>( ( (int(a) + int(b)) * int(x) + (int(c) + int(d)) * int(y) ) / ( (int(x) + (int(y))) << 1 ) )
using namespace std;

namespace openni_wrapper
Expand Down
6 changes: 3 additions & 3 deletions outofcore/src/cJSON.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ static const char *parse_string(cJSON *item,const char *str)
len=3;if (uc<0x80) len=1;else if (uc<0x800) len=2;ptr2+=len;

switch (len) {
case 3: *--ptr2 =(( (uc) | 0x80) & 0xBF );
case 3: *--ptr2 = static_cast<char>(( (uc) | 0x80) & 0xBF );
uc >>= 6;
case 2: *--ptr2 =(( (uc) | 0x80) & 0xBF );
case 2: *--ptr2 = static_cast<char>(( (uc) | 0x80) & 0xBF );
uc >>= 6;
case 1: *--ptr2 =( (uc) | firstByteMark[len] );
case 1: *--ptr2 = static_cast<char>( (uc) | firstByteMark[len] );
}
ptr2+=len;ptr+=4;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace pcl
{
const size_t num_of_features = static_cast<size_t> (features.size ());
write (stream, num_of_features);
for (int feature_index = 0; feature_index < num_of_features; ++feature_index)
for (size_t feature_index = 0; feature_index < num_of_features; ++feature_index)
{
write (stream, features[feature_index]);
}
Expand Down
Loading

0 comments on commit ff10a21

Please sign in to comment.