forked from mirrors/linux
		
	gcc-9: properly declare the {pv,hv}clock_page storage
The pvlock_page and hvclock_page variables are (as the name implies)
addresses to pages, created by the linker script.
But we declared them as just "extern u8" variables, which _works_, but
now that gcc does some more bounds checking, it causes warnings like
    warning: array subscript 1 is outside array bounds of ‘u8[1]’
when we then access more than one byte from those variables.
Fix this by simply making the declaration of the variables match
reality, which makes the compiler happy too.
Signed-off-by: Linus Torvalds <torvalds@-linux-foundation.org>
			
			
This commit is contained in:
		
							parent
							
								
									cf67690884
								
							
						
					
					
						commit
						459e3a2153
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -29,12 +29,12 @@ extern int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz);
 | 
				
			||||||
extern time_t __vdso_time(time_t *t);
 | 
					extern time_t __vdso_time(time_t *t);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CONFIG_PARAVIRT_CLOCK
 | 
					#ifdef CONFIG_PARAVIRT_CLOCK
 | 
				
			||||||
extern u8 pvclock_page
 | 
					extern u8 pvclock_page[PAGE_SIZE]
 | 
				
			||||||
	__attribute__((visibility("hidden")));
 | 
						__attribute__((visibility("hidden")));
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CONFIG_HYPERV_TSCPAGE
 | 
					#ifdef CONFIG_HYPERV_TSCPAGE
 | 
				
			||||||
extern u8 hvclock_page
 | 
					extern u8 hvclock_page[PAGE_SIZE]
 | 
				
			||||||
	__attribute__((visibility("hidden")));
 | 
						__attribute__((visibility("hidden")));
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue