Skip to content
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

Correct errors in PolyType toString method #747

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

Joshua-Anderson
Copy link
Contributor

Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s)
Has Unit Tests (y/n) y
Builds Without Errors (y/n)
Unit Tests Pass (y/n) y
Documentation Included (y/n)

Change Description

Correct errors in PolyType toString method:

  • Properly print unsigned types
  • Don't cast 64 bit values to long long, which is C++11 only.

I used the inttypes header to help generate the correct format specifiers, which can vary per-platform.

@Joshua-Anderson Joshua-Anderson requested a review from LeStarch June 21, 2021 22:12
@github-actions
Copy link

Misspellings found, please review:

  • PRId
  • PRIu
  • STDC
To accept these changes, run the following commands from this repository on this branch
pushd $(git rev-parse --show-toplevel)
perl -e '
my @expect_files=qw('".github/actions/spelling/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"ALOG ANOTHEREVENT aquat BADCHECKSUM BINDERROR BUFFERACCEPTED BUFFERACCUMULATOR BUFFERLOGGER BUFFERTOOSMALL BYTESRECEIVED BYTESRECV BYTESSENT CANCELCOMMANDS CMDRESPONSE CMDRESPONSEIN CMDSEQIN CMDSEQUENCER CMDSTARTED CMDSTEPPED COMMANDCOMPLETE COMMANDERROR COMMANDSEXECUTED CONFIGERROR CYCLEIN Cyg czf Dbtestut decodeerror DIRECTORYCREATEERROR DIRECTORYREMOVEERROR DROPPEDPACKET enumchanarg FILECLOSED FILECRCFAILURE FILEINVALID FILEMOVEERROR FILENOTFOUND FILEOPENERROR FILEREADERROR FILERECEIVED FILEREMOVEERROR FILESIZEERROR FILESRECEIVED FILEUPLINK FILEVALIDATIONERROR FILEWRITEERROR FLUSHFILE Imm INTSTARTERROR Inttype INTWAITERROR INVALIDMODE INVALIDRECEIVEMODE llu LOADCOMMANDS LOGFILECLOSED LOGFILEOPENERROR LOGFILEVALIDATIONERROR LOGFILEWRITEERROR LOQQUEUE MODESWITCHED NOBUFFERS NOLOGFILEOPENINITERROR NOSEQUENCEACTIVE NUMLOGGEDBUFFERS NUMQUEUEDBUFFERS OPENERROR OPENFILE PACKETOUTOFBOUNDS PACKETOUTOFORDER PACKETSDROPPED PACKETSRECEIVED PACKETSSENT PINGIN PINGLATEWARNINGS PINGRETURN PORTOPENED PORTSEQUENCESTARTED PRMDBFULL PRMFILELOADCOMPLETE PRMFILEREADERROR PRMFILESAVECOMPLETE PRMFILEWRITEERROR PRMIDADDED PRMIDNOTFOUND PRMIDUPDATED PRMSET QUEUEFULL RATEGROUPCYCLESLIP RATEGROUPSTARTED READERROR RECORDINVALID RECORDMISMATCH RECVERROR RGCYCLESLIPS RGMAXTIME SCHEDIN SENDERROR SEQRUNIN SEQUENCECANCELED SEQUENCECOMPLETE SEQUENCELOADED Sequencertestut SEQUENCESCOMPLETED SEQUENCETIMEOUT SEQUENCEVALID SETMODE SETPRM SHELLCOMMANDFAILED SHELLCOMMANDSUCCEEDED SOCKETERROR somechanarg someenumchan someenumchanarg Someother SOMEOTHEREVENT TIMEBASEMISMATCH TIMECONTEXTMISMATCH UNEXPECTEDCOMPLETION UPLINKCANCELED WRITEERROR "');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
  if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
  next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
make_path ".github/actions/spelling";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"AQuat inttype PRId PRIu STDC "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
popd

@LeStarch LeStarch merged commit 27a0178 into nasa:devel Jun 22, 2021
@Joshua-Anderson Joshua-Anderson deleted the polytype-to-string branch June 22, 2021 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants