Commit [c884b7] Maximize Restore History

Fix compile errors on Ubuntu 14.04

The gcc 4.8.2 on Ubuntu 14.04 complains about two different
types of issues that we've not seen older compilers complain about.
The complaints are warnings that are turned into errors, due to
our use of -Werror. The first type of error involves fprintf:

error: format not a string literal and no format arguments

I've found the following explanation for this change in gcc behavior:

If -Wformat is specified, also warn about uses of format
functions that represent possible security problems. At present,
this warns about calls to "printf" and "scanf" functions where
the format string is not a string literal and there are no format
arguments, as in "printf (foo);". This may be a security hole if
the format string came from untrusted input and contains %n.
(This is currently a subset of what -Wformat-nonliteral warns
about, but in future warnings may be added to -Wformat-security
that are not included in -Wformat-nonliteral.)

The second type of error is for not checking the return value of fgets.

This patch fixes these two issues and resolved the compilation problems.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

Maynard Johnson Maynard Johnson 2014-03-05

changed libpe_utils/op_pe_utils.cpp
changed libperf_events/operf_counter.cpp
changed opjitconv/opjitconv.c
libpe_utils/op_pe_utils.cpp Diff Switch to side-by-side view
Loading...
libperf_events/operf_counter.cpp Diff Switch to side-by-side view
Loading...
opjitconv/opjitconv.c Diff Switch to side-by-side view
Loading...