mirror of
				https://github.com/eclipse/upm.git
				synced 2025-10-30 22:54:44 +03:00 
			
		
		
		
	C: Fixes for sign compares in C libraries
Added explicit error for sign compares to CMake. Updated a handful of C source which compared unsigned vs signed. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
		| @@ -86,7 +86,7 @@ upm_result_t es08a_set_angle(es08a_context dev, int32_t angle){ | ||||
|  | ||||
| upm_result_t es08a_calc_pulse_travelling(const es08a_context dev, | ||||
|                                          int32_t* ret_val, int32_t value){ | ||||
|     if (value > dev->max_pulse_width) { | ||||
|     if (value > (int)dev->max_pulse_width) { | ||||
|         return dev->max_pulse_width; | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -87,7 +87,7 @@ upm_result_t es9257_set_angle(es9257_context dev, int32_t angle){ | ||||
|  | ||||
| upm_result_t es9257_calc_pulse_travelling(const es9257_context dev, | ||||
|                                          int32_t* ret_val, int32_t value){ | ||||
|     if (value > dev->max_pulse_width) { | ||||
|     if (value > (int)dev->max_pulse_width) { | ||||
|         return dev->max_pulse_width; | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Noel Eck
					Noel Eck