Re: [edk2-devel] [PATCH v1] EmulatorPkg: Fix Terminal Issues

2023-09-26 Thread Nate DeSimone
Thanks for the reminder/education on the coding style. I knew my habit of putting variables at the top of functions came from somewhere. Pushed: https://github.com/tianocore/edk2/commit/ad1c039 -Original Message- From: Kinney, Michael D Sent: Tuesday, September 26, 2023 2:43 PM To: Des

Re: [edk2-devel] [PATCH v1] EmulatorPkg: Fix Terminal Issues

2023-09-26 Thread Michael D Kinney
Hi Nate, Declaring all the local variables at the top of the function is really a coding style recommendation documented in the EDK II C Coding Style Specification. End of Section 5.4.1.1. Declaring local in other scopes is strongly discouraged. https://tianocore-docs.github.io/edk2-CCodingSta

Re: [edk2-devel] [PATCH v1] EmulatorPkg: Fix Terminal Issues

2023-09-26 Thread Nate DeSimone
Looks like it compiles fine in VS2015, and we just removed the tools_def entries for every VC++ version older than that. And C99 has been in gcc for a very long time and clang forever. So perhaps we can start using C99 style variable declarations finally? Thanks, Nate -Original Message

Re: [edk2-devel] [PATCH v1] EmulatorPkg: Fix Terminal Issues

2023-09-26 Thread Nate DeSimone
Oh, never mind, I see you are suggesting a C99 style variable declaration. Do we need to worry about old compiler that want all variable declarations at the top still? Thanks, Nate -Original Message- From: Desimone, Nathaniel L Sent: Tuesday, September 26, 2023 1:38 PM To: Kinney, Mich

Re: [edk2-devel] [PATCH v1] EmulatorPkg: Fix Terminal Issues

2023-09-26 Thread Nate DeSimone
Hi Mike, Unfortunately, that change will generate the following warning on GCC4.6+ warning: variable "Success" set but not used [-Wunused-but-set-variable] Hence why I wrote it that way. Let me know if you would like me to make a different change before committing. Thanks, Nate -Original

Re: [edk2-devel] [PATCH v1] EmulatorPkg: Fix Terminal Issues

2023-09-26 Thread Michael D Kinney
Thanks Nate! I have noticed this issue for a while. One comment below. With that update: Reviewed-by: Michael D Kinney Mike > -Original Message- > From: Desimone, Nathaniel L > Sent: Tuesday, September 26, 2023 11:36 AM > To: devel@edk2.groups.io > Cc: Andrew Fish ; Ni, Ray ; Kinney