fix gcc 7 format-truncation error
This commit is contained in:
		
							parent
							
								
									c69d4079dd
								
							
						
					
					
						commit
						0586fc36fc
					
				
							
								
								
									
										15
									
								
								memcached-1.4.34-gcc7fmt.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								memcached-1.4.34-gcc7fmt.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | |||||||
|  | 
 | ||||||
|  | gcc -Wformat-truncation thinks this might truncate. | ||||||
|  | 
 | ||||||
|  | diff -uap memcached-1.4.34/util.c.gcc7fmt memcached-1.4.34/util.c
 | ||||||
|  | --- memcached-1.4.34/util.c.gcc7fmt
 | ||||||
|  | +++ memcached-1.4.34/util.c
 | ||||||
|  | @@ -18,7 +18,7 @@
 | ||||||
|  |          if (isalnum(x) || x == '-' || x == '.' || x == '_' || x == '~') { | ||||||
|  |              uriencode_map[x] = NULL; | ||||||
|  |          } else { | ||||||
|  | -            snprintf(str, 4, "%%%02X", x);
 | ||||||
|  | +            snprintf(str, 4, "%%%02hhX", (unsigned char)x);
 | ||||||
|  |              uriencode_map[x] = str; | ||||||
|  |              str += 3; /* lobbing off the \0 is fine */ | ||||||
|  |          } | ||||||
| @ -4,7 +4,7 @@ | |||||||
| 
 | 
 | ||||||
| Name:           memcached | Name:           memcached | ||||||
| Version:        1.4.34 | Version:        1.4.34 | ||||||
| Release:        2%{?dist} | Release:        3%{?dist} | ||||||
| Epoch:          0 | Epoch:          0 | ||||||
| Summary:        High Performance, Distributed Memory Object Cache | Summary:        High Performance, Distributed Memory Object Cache | ||||||
| 
 | 
 | ||||||
| @ -15,6 +15,7 @@ Source0:        http://www.memcached.org/files/%{name}-%{version}.tar.gz | |||||||
| Source1:        memcached.sysconfig | Source1:        memcached.sysconfig | ||||||
| 
 | 
 | ||||||
| Patch1:         memcached-unit.patch | Patch1:         memcached-unit.patch | ||||||
|  | Patch2:         memcached-1.4.34-gcc7fmt.patch | ||||||
| 
 | 
 | ||||||
| BuildRequires:  libevent-devel systemd-units | BuildRequires:  libevent-devel systemd-units | ||||||
| BuildRequires:  perl-generators | BuildRequires:  perl-generators | ||||||
| @ -43,6 +44,7 @@ access to the memcached binary include files. | |||||||
| %prep | %prep | ||||||
| %setup -q | %setup -q | ||||||
| %patch1 -p1 -b .unit | %patch1 -p1 -b .unit | ||||||
|  | %patch2 -p1 -b .gcc7fmt | ||||||
| 
 | 
 | ||||||
| %build | %build | ||||||
| # compile with full RELRO | # compile with full RELRO | ||||||
| @ -121,6 +123,9 @@ exit 0 | |||||||
| %{_includedir}/memcached/* | %{_includedir}/memcached/* | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Wed Feb 15 2017 Joe Orton <jorton@redhat.com> - 0:1.4.34-3 | ||||||
|  | - fix gcc 7 format-truncation error | ||||||
|  | 
 | ||||||
| * Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.4.34-2 | * Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.4.34-2 | ||||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild | - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user