remove some compiler warnings
r1509 | dcl | 2007-02-19 12:30:28 +1100 (Mon, 19 Feb 2007) | 2 lines
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <ctype.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include "fortify.h"
|
#include "fortify.h"
|
||||||
@@ -82,7 +83,7 @@ static void flog(char flag, char* format, ...) {
|
|||||||
if (file) {
|
if (file) {
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
(void) gettimeofday(&tv, NULL);
|
(void) gettimeofday(&tv, NULL);
|
||||||
fprintf(file, "%02d:%02d:%02d:%06d::%c::",
|
fprintf(file, "%02ld:%02ld:%02ld:%06ld::%c::",
|
||||||
tv.tv_sec % (24 * 3600) / 3600,
|
tv.tv_sec % (24 * 3600) / 3600,
|
||||||
tv.tv_sec % (3600) / 60,
|
tv.tv_sec % (3600) / 60,
|
||||||
tv.tv_sec % 60,
|
tv.tv_sec % 60,
|
||||||
@@ -250,7 +251,6 @@ static int MonWrite(pBeamMon self, char* text) {
|
|||||||
|
|
||||||
status = writeRS232(self->controller, text, (int) len);
|
status = writeRS232(self->controller, text, (int) len);
|
||||||
if (status != 1) {
|
if (status != 1) {
|
||||||
char str[80];
|
|
||||||
flog('#', "MonWrite status = %d, errno = %d\n", status, errno);
|
flog('#', "MonWrite status = %d, errno = %d\n", status, errno);
|
||||||
self->errorCode = status;
|
self->errorCode = status;
|
||||||
if (status == BADSEND && errno == EPIPE)
|
if (status == BADSEND && errno == EPIPE)
|
||||||
@@ -270,8 +270,6 @@ static int MonWrite(pBeamMon self, char* text) {
|
|||||||
*/
|
*/
|
||||||
static int MonRead(pBeamMon self, /*@out@*/ char* text, int *pLen) {
|
static int MonRead(pBeamMon self, /*@out@*/ char* text, int *pLen) {
|
||||||
int i, status, retries=2;
|
int i, status, retries=2;
|
||||||
char str[80];
|
|
||||||
char buf[1];
|
|
||||||
|
|
||||||
*text = '\0';
|
*text = '\0';
|
||||||
for (i = 0; i <= retries; i++) {
|
for (i = 0; i <= retries; i++) {
|
||||||
@@ -388,7 +386,6 @@ static void HandleReport(CounterDriver *cntrData, BUFFER* bp)
|
|||||||
BeamMon* self = NULL;
|
BeamMon* self = NULL;
|
||||||
char *cp = NULL;
|
char *cp = NULL;
|
||||||
char *ep = NULL;
|
char *ep = NULL;
|
||||||
char str[100];
|
|
||||||
self = (BeamMon *) cntrData->pData;
|
self = (BeamMon *) cntrData->pData;
|
||||||
/* TODO better than this */
|
/* TODO better than this */
|
||||||
cp = &bp->body[26];
|
cp = &bp->body[26];
|
||||||
@@ -699,7 +696,6 @@ static int MonReadValues(CounterDriver *cntrData) {
|
|||||||
*/
|
*/
|
||||||
static int MonGetError(CounterDriver *cntrData, int *iCode, char *error, int iErrLen) {
|
static int MonGetError(CounterDriver *cntrData, int *iCode, char *error, int iErrLen) {
|
||||||
BeamMon *self = NULL;
|
BeamMon *self = NULL;
|
||||||
char str[40];
|
|
||||||
|
|
||||||
self = (BeamMon *) cntrData->pData;
|
self = (BeamMon *) cntrData->pData;
|
||||||
/* Allocate iErrLen bytes for error messages */
|
/* Allocate iErrLen bytes for error messages */
|
||||||
|
|||||||
Reference in New Issue
Block a user