[issue44390] PC/frozen_dllmain.c, some expressions have no side effects

Brother Beer report at bugs.python.org
Fri Jun 11 04:43:42 EDT 2021


New submission from Brother Beer <brotherbeer at 163.com>:

cpython-3.10.0b2/PC/frozen_dllmain.c, line 66

 63 void PyWinFreeze_ExeInit(void)
 64 {
 65     char **modName;
 66     for (modName = possibleModules;*modName;*modName++) {
 67 /*              printf("Initialising '%s'\n", *modName); */
 68         CallModuleDllMain(*modName, DLL_PROCESS_ATTACH);
 69     }
 70 }

'*' in '*modName++' is redundant? Line 82 has the same problem

 76 void PyWinFreeze_ExeTerm(void)
 77 {
 78     // Must go backwards
 79     char **modName;
 80     for (modName = possibleModules+Py_ARRAY_LENGTH(possibleModules)-2;
 81          modName >= possibleModules;
 82          *modName--) {
 83 /*              printf("Terminating '%s'\n", *modName);*/
 84         CallModuleDllMain(*modName, DLL_PROCESS_DETACH);
 85     }
 86 }

----------
messages: 395619
nosy: brotherbeer
priority: normal
severity: normal
status: open
title: PC/frozen_dllmain.c, some expressions have no side effects
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44390>
_______________________________________


More information about the Python-bugs-list mailing list