mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Remove some unnecessary casts in format arguments
We can use %zd or %zu directly, no need to cast to int. Conversely, some code was casting away from int when it could be using %d directly.
This commit is contained in:
		@@ -1240,8 +1240,8 @@ SpGistPageAddNewItem(SpGistState *state, Page page, Item item, Size size,
 | 
			
		||||
					*startOffset = offnum + 1;
 | 
			
		||||
			}
 | 
			
		||||
			else
 | 
			
		||||
				elog(PANIC, "failed to add item of size %u to SPGiST index page",
 | 
			
		||||
					 (int) size);
 | 
			
		||||
				elog(PANIC, "failed to add item of size %zu to SPGiST index page",
 | 
			
		||||
					 size);
 | 
			
		||||
 | 
			
		||||
			return offnum;
 | 
			
		||||
		}
 | 
			
		||||
@@ -1252,8 +1252,8 @@ SpGistPageAddNewItem(SpGistState *state, Page page, Item item, Size size,
 | 
			
		||||
						 InvalidOffsetNumber, false, false);
 | 
			
		||||
 | 
			
		||||
	if (offnum == InvalidOffsetNumber && !errorOK)
 | 
			
		||||
		elog(ERROR, "failed to add item of size %u to SPGiST index page",
 | 
			
		||||
			 (int) size);
 | 
			
		||||
		elog(ERROR, "failed to add item of size %zu to SPGiST index page",
 | 
			
		||||
			 size);
 | 
			
		||||
 | 
			
		||||
	return offnum;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user