Use the z-option to printf %d for size_t printf. z is supported by the
libcurl *printf and by Linux printf(). This should make the code work nicely even for 64bit size_ts.
This commit is contained in:
		@@ -2427,11 +2427,11 @@ void dump(const char *text,
 | 
			
		||||
    /* without the hex output, we can fit more on screen */
 | 
			
		||||
    width = 0x40;
 | 
			
		||||
 | 
			
		||||
  fprintf(stream, "%s, %d bytes (0x%x)\n", text, size, size);
 | 
			
		||||
  fprintf(stream, "%s, %zd bytes (0x%zx)\n", text, size, size);
 | 
			
		||||
 | 
			
		||||
  for(i=0; i<size; i+= width) {
 | 
			
		||||
 | 
			
		||||
    fprintf(stream, "%04x: ", i);
 | 
			
		||||
    fprintf(stream, "%04zx: ", i);
 | 
			
		||||
 | 
			
		||||
    if(!nohex) {
 | 
			
		||||
      /* hex not disabled, show it */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user