summaryrefslogtreecommitdiff
path: root/gptcurses.cc
diff options
context:
space:
mode:
authorRod Smith <rodsmith@rodsbooks.com>2018-07-05 16:50:13 -0400
committerRod Smith <rodsmith@rodsbooks.com>2018-07-05 16:50:13 -0400
commit9ae60195b9d24c01f535ade5b7bcf0e63c0600be (patch)
tree3f7c35f56cb9222be3081c57b3f7d61af3390483 /gptcurses.cc
parent8dab6f22ee54e63d98cf303d16702794d091bcbb (diff)
downloadsgdisk-9ae60195b9d24c01f535ade5b7bcf0e63c0600be.tar.gz
Added explicit copy constructors and made other tweaks to avoid
compiler complaints.
Diffstat (limited to 'gptcurses.cc')
-rw-r--r--gptcurses.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gptcurses.cc b/gptcurses.cc
index a9f466c..3e9b240 100644
--- a/gptcurses.cc
+++ b/gptcurses.cc
@@ -394,6 +394,7 @@ void GPTDataCurses::ChangeType(int partNum) {
// Sets the partition alignment value
void GPTDataCurses::SetAlignment(void) {
int alignment;
+ char conversion_specifier[] = "%d";
move(LINES - 4, 0);
clrtobot();
@@ -402,7 +403,7 @@ void GPTDataCurses::SetAlignment(void) {
move(LINES - 3, 0);
printw("Type new alignment value, in sectors: ");
echo();
- scanw("%d", &alignment);
+ scanw(conversion_specifier, &alignment);
noecho();
} while ((alignment == 0) || (alignment > MAX_ALIGNMENT));
GPTData::SetAlignment(alignment);