mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	bpo-40714: Remove compile warning from _zoneinfo.c (GH-20291)
This commit is contained in:
		
							parent
							
								
									e16d2f7c37
								
							
						
					
					
						commit
						a487a39dca
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -1457,7 +1457,9 @@ parse_tz_str(PyObject *tz_str_obj, _tzrule *out)
 | 
				
			||||||
    PyObject *dst_abbr = NULL;
 | 
					    PyObject *dst_abbr = NULL;
 | 
				
			||||||
    TransitionRuleType *start = NULL;
 | 
					    TransitionRuleType *start = NULL;
 | 
				
			||||||
    TransitionRuleType *end = NULL;
 | 
					    TransitionRuleType *end = NULL;
 | 
				
			||||||
    long std_offset, dst_offset;
 | 
					    // Initialize offsets to invalid value (> 24 hours)
 | 
				
			||||||
 | 
					    long std_offset = 1 << 20;
 | 
				
			||||||
 | 
					    long dst_offset = 1 << 20;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    char *tz_str = PyBytes_AsString(tz_str_obj);
 | 
					    char *tz_str = PyBytes_AsString(tz_str_obj);
 | 
				
			||||||
    if (tz_str == NULL) {
 | 
					    if (tz_str == NULL) {
 | 
				
			||||||
| 
						 | 
					@ -1907,7 +1909,7 @@ build_tzrule(PyObject *std_abbr, PyObject *dst_abbr, long std_offset,
 | 
				
			||||||
             long dst_offset, TransitionRuleType *start,
 | 
					             long dst_offset, TransitionRuleType *start,
 | 
				
			||||||
             TransitionRuleType *end, _tzrule *out)
 | 
					             TransitionRuleType *end, _tzrule *out)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    _tzrule rv = {0};
 | 
					    _tzrule rv = {{0}};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    rv.start = start;
 | 
					    rv.start = start;
 | 
				
			||||||
    rv.end = end;
 | 
					    rv.end = end;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue