Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • ntpsec ntpsec
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 59
    • Issues 59
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 23
    • Merge requests 23
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • NTPsecNTPsec
  • ntpsecntpsec
  • Issues
  • #71
Closed
Open
Issue created Jun 03, 2016 by Hal Murray@hal.murrayMaintainer

Compiler warnings

From FreeBSD 11.0-CURRENT on a Pi-2

FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) Target: armv6--freebsd11.0-gnueabi Thread model: posix InstalledDir: /usr/bin

../../libisc/netaddr.c:145:3: warning: variable 'i' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
i++;
^
../../libisc/netaddr.c:142:22: note: incremented here
for (; i < ipbytes; i++) {

../../tests/libntp/sfptostr.c: In function ‘TEST_sfptostr_NegativeInteger_’:
../../tests/libntp/sfptostr.c:31:19: warning: left shift of negative value [-Wshift-negative-value]
s_fp test = -200 << 16; // exact -200.000000
^~
../../tests/libntp/sfptostr.c: In function ‘TEST_sfptostr_NegativeIntegerNegativeFraction_’:
../../tests/libntp/sfptostr.c:45:20: warning: left shift of negative value [-Wshift-negative-value]
s_fp test = (-200 << 16) - (1 << 15); // -200 - 0.5
^~
../../tests/libntp/sfptostr.c: In function ‘TEST_sfptostr_NegativeIntegerPositiveFraction_’:
../../tests/libntp/sfptostr.c:59:20: warning: left shift of negative value [-Wshift-negative-value]
s_fp test = (-200 << 16) + (1 << 14)*3; // -200 + 0.75
^~

The negative shifts are also noticed by gcc on Fedora 24 Alpha

gcc (GCC) 6.1.1 20160510 (Red Hat 6.1.1-2)

Assignee
Assign to
Time tracking