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

libfreenect/fakenect/fakenect.c:78: bad type for local variable ? #365

Closed
dcb314 opened this issue Feb 8, 2014 · 0 comments
Closed

libfreenect/fakenect/fakenect.c:78: bad type for local variable ? #365

dcb314 opened this issue Feb 8, 2014 · 0 comments
Milestone

Comments

@dcb314
Copy link

dcb314 commented Feb 8, 2014

libfreenect/fakenect/fakenect.c:78]: (warning) Storing fgetc() return value in char variable and then comparing with EOF.

Source code is

char c;
while ((c = fgetc(fp))) {
    if (c == '\n' || c == EOF)

Suggest change type of c from char to int. I found this bug in the
latest sources in git with static analyser cppcheck.

@piedar piedar added this to the v0.4.0 milestone Feb 9, 2014
@piedar piedar closed this as completed in a05075a Feb 9, 2014
yarikoptic added a commit to yarikoptic/libfreenect that referenced this issue Feb 14, 2015
libfreenect v0.4.0 Oracle

* tag 'v0.4.0':
  Update for v0.4.0
  All headers (including libfreenect.hpp) are installed to `$PREFIX/include/libfreenect/`. All libfreenect files have `#include "libfreenect.h"` rather than `#include <libfreenect.h>`.  This works during build and after installation all include files are in the same directory. Rename libfreenect-audio.h -> libfreenect_audio.h and libfreenect-registration.h -> libfreenect_registration.h.  This makes them consistent with other libraries.
  wrappers/cpp: Call freenect_process_events_timeout in loop to prevent freezes - fixes OpenKinect#223
  OpenNI2-FreenectDriver: Fix silly silly string bugs; improve logging Fix ebuild for filename change
  OpenNI2-FreenectDriver: Convert all printf and cout statements to log messages
  Invoke fwfetcher.py with python2 - fixes OpenKinect#370 Refine README.md
  Remove C99 syntax - fixes OpenKinect#369
  Shiny new README.md Beautify ebuild and add audio USE flag
  Read int from fgetc for EOF comparison - fixes OpenKinect#365
  Replaced missing variable - fixes OpenKinect#366
  Post-merge cleanup
  small changes to allow compile on windows / visual studio
  Removed memset() after free() causing sporadic crashes when unplugging devices
  Fix ebuild
  Supports loading audio fw from memory as well as disk. Supports tilt,accel and led for K4W and 1473 device. Adds keep alive for K4W and 1473. Signed-off-by: Theodore Watson theo@openframeworks.cc (ofTheo)
  This code sets the LED of a 1473 Kinect or K4W Kinect to red on startup. This seems to fix a known issue for OS X users where the device renumerates within a small time period and causes a freeze. Closes OpenKinect#340 and addresses OpenKinect#316. Signed-off-by: Theodore Watson <theo@openframeworks.cc> (ofTheo)
  Remove outdated ebuild
  Add manpages for fakenect and fakenect-record
  Prefix freenect- to the name of the installed demos
  Rename record binary of fakenect as fakenect-record
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

No branches or pull requests

2 participants