/* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped
non-option ARGV-elements is empty. */
-
+ (void)argc;
+ (void)argv;
+
first_nonopt = last_nonopt = tools_optind;
nextchar = NULL;
}
else
{
- if (tools_opterr)
+ if (tools_opterr) {
if (argv[tools_optind - 1][1] == '-')
/* --option */
fprintf (stderr,
fprintf (stderr,
_("%s: option `%c%s' doesn't allow an argument\n"),
argv[0], argv[tools_optind - 1][0], pfound->name);
-
+ }
nextchar += strlen (nextchar);
tools_optopt = pfound->val;
libmtcr_ul_a_SOURCES = mtcr_ul.c mtcr_ib_ofed.c mtcr_ib.h mtcr_int_defs.h
-libmtcr_ul_a_CFLAGS = -W -g -MP -MD -fPIC -DMTCR_API="" -DMST_UL
+libmtcr_ul_a_CFLAGS = -W -Wall -g -MP -MD -fPIC -DMTCR_API="" -DMST_UL
libraryincludedir=$(includedir)/mtcr_ul
libraryinclude_HEADERS = $(top_srcdir)/include/mtcr_ul/mtcr.h
/*
* Copyright (C) Jan 2013 Mellanox Technologies Ltd. All rights reserved.
- *
+ *
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* OpenIB.org BSD license below:
- *
+ *
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
- *
+ *
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
- *
+ *
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
int process_dynamic_linking(ibvs_mad *ivm, int mad_init)
{
-
+ (void)mad_init;
char* libs[] = {"libibmad.so.5"};
u_int32_t i;
static
int get_inband_dev_from_pci(char* inband_dev, char* pci_dev)
{
- unsigned domain = 0, bus = 0, dev = 0, func = 0, force = 0;
+ unsigned domain = 0, bus = 0, dev = 0, func = 0;
+ int force = 0;
enum mtcr_access_method access;
DIR* d;
struct dirent *dir;
}
}
- mf->maccess_reg(mf, data);
+ return mf->maccess_reg(mf, data);
}
int mos_reg_access(mfile *mf, int reg_access, void *reg_data, u_int32_t cmd_type)
char* fpath;
char line[1024];
char *offset, *size;
- unsigned tmp;
int path_found = 0;
if (!adb_dump) {
#define VPD_TAG_LARGE(d) ((d)->type & 0x80)
-#define VPD_TAG_LENGTH(d) (VPD_TAG_LARGE(d) ? ((((d)->large.length_msb) << 8) | \
+#define VPD_TAG_LENGTH(d) ((unsigned)(VPD_TAG_LARGE(d) ? ((((d)->large.length_msb) << 8) | \
((d)->large.length_lsb)) : \
- ((d)->type & 0x7))
+ ((d)->type & 0x7)))
#define VPD_TAG_HEAD(d) (VPD_TAG_LARGE(d) ? sizeof (d)->large : sizeof (d)->small)
void vpd_show_fields(FILE *f, union vpd_data_type *d, const char *keyword)
{
struct vpd_field *field;
- int i;
+ unsigned i;
for (i = 0; i < VPD_TAG_LENGTH(d); i += 0x3 + field->length) {
field = (struct vpd_field *)(VPD_TAG_DATA(d)->bytes + i);
void vpd_show_id(FILE *f, union vpd_data_type *d)
{
- int i;
+ unsigned i;
fputs("ID: ", f);
for (i = 0; i < VPD_TAG_LENGTH(d); ++i)
int vpd_check(vpd_t vpd, int checksum, int ignore_w)
{
unsigned char b;
- int i;
+ unsigned i;
unsigned offset;
int rc;
union vpd_data_type *d = NULL;