-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dead code removal in client/src #51
Conversation
1500384
to
321ac70
Compare
Update checkpatch.pl to support four-space indentation since that is the convention used in this project. Otherwise we get false warnings like this: WARNING: suspect code indent for conditional statements (8, 12) LLNL#310: FILE: client/src/unifycr-stdio.c:2523: + if (p > buf) { (void) ungetc(*(u_char *)--p, (FILE *)fp);
Remove commented out code blocks and fix a few code formatting issues in client/src/unifycr-stdio.c. This is to improve code readability.
Remove commented out code in client/src/unifycr.c to improve readability. This leaves behind stubbed out functions that presumably need to be implemented. We will open github issues to track that work and link to this commit in case the removed code is needed for reference.
321ac70
to
8165103
Compare
This generally looks fine to me. One note about the memcopy. We have a few variants of that around because it is handy for testing when saving data in shared memory. We found that different memcopy functions performed quite differently depending on the architecture and compiler. I think for testing I was lazy and just commented them in/out. We should find a good way to do that if it still matters, e.g., compile time guards or something. |
Commit 75543ec ("Dead code removal in client/src (LLNL#51)")' made checkpatch.pl unfriendly toward tab-indented code. We haven't completely converted to the 4-space indentation convention, so revert that part of the commit. Otherwise we get false warnings like this: WARNING: suspect code indent for conditional statements (8, 16) LLNL#497: FILE: meta/src/mdhim.c:799: if (op == MDHIM_GET_EQ || op == MDHIM_GET_PRIMARY_EQ) { + mlog(MDHIM_CLIENT_CRIT, "MDHIM Rank: %d - "
Commit 75543ec ("Dead code removal in client/src (LLNL#51)")' made checkpatch.pl unfriendly toward tab-indented code. We haven't completely converted to the 4-space indentation convention, so revert that part of the commit. Otherwise we get false warnings like this: WARNING: suspect code indent for conditional statements (8, 16) LLNL#497: FILE: meta/src/mdhim.c:799: if (op == MDHIM_GET_EQ || op == MDHIM_GET_PRIMARY_EQ) { + mlog(MDHIM_CLIENT_CRIT, "MDHIM Rank: %d - "
Commit 75543ec ("Dead code removal in client/src (#51)")' made checkpatch.pl unfriendly toward tab-indented code. We haven't completely converted to the 4-space indentation convention, so revert that part of the commit. Otherwise we get false warnings like this: WARNING: suspect code indent for conditional statements (8, 16) #497: FILE: meta/src/mdhim.c:799: if (op == MDHIM_GET_EQ || op == MDHIM_GET_PRIMARY_EQ) { + mlog(MDHIM_CLIENT_CRIT, "MDHIM Rank: %d - "
Remove a bunch of commented out code and address a few nearby code formatting issues.
I updated checkpatch.pl in this PR because it doesn't correctly support the indentation convention for this project and it was causing false warnings for the other patches.
Some functions in unifycr.c are now completely stubbed out. Rather than keeping the code commented out there, I propose we create github issues to track the need to implement (or possibly remove) the stubs.