mirror of
				https://github.com/NVIDIA/cuda-samples.git
				synced 2025-11-04 07:27:49 +08:00 
			
		
		
		
	nvJPEG: Modify write_images function to return void instead of int
- Changed return type from int to void - Removed EXIT_FAILURE return in error case (unchecked) - Removed control reaches end of non-void function
This commit is contained in:
		
							parent
							
								
									8b2b51e2a5
								
							
						
					
					
						commit
						96901090bc
					
				@ -312,7 +312,7 @@ int decode_images(const FileData &img_data, const std::vector<size_t> &img_len,
 | 
			
		||||
  return EXIT_SUCCESS;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int write_images(std::vector<nvjpegImage_t> &iout, std::vector<int> &widths,
 | 
			
		||||
void write_images(std::vector<nvjpegImage_t> &iout, std::vector<int> &widths,
 | 
			
		||||
                 std::vector<int> &heights, decode_params_t ¶ms,
 | 
			
		||||
                 FileNames &filenames) {
 | 
			
		||||
  for (int i = 0; i < params.batch_size; i++) {
 | 
			
		||||
@ -341,7 +341,7 @@ int write_images(std::vector<nvjpegImage_t> &iout, std::vector<int> &widths,
 | 
			
		||||
    }
 | 
			
		||||
    if (err) {
 | 
			
		||||
      std::cout << "Cannot write output file: " << fname << std::endl;
 | 
			
		||||
      return EXIT_FAILURE;
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
    std::cout << "Done writing decoded image to file: " << fname << std::endl;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user